Skip to content

Admin portal

Implement Scalekit's self-serve admin portal to let customers configure SSO and SCIM via a shareable link or embedded iframe

The admin portal provides a self-serve interface for customers to configure single sign-on (SSO) and directory sync (SCIM) connections. Scalekit hosts the portal and provides two integration methods: generate a shareable link through the dashboard or programmatically embed the portal in your application using an iframe.

This guide shows you how to implement both integration methods. For the broader customer onboarding workflow, see Onboard enterprise customers.

Section titled “Generate shareable portal link ”

Generate a shareable link through the Scalekit dashboard to give customers access to the admin portal. This method requires no code and is ideal for quick setup.

  1. Log in to the Scalekit dashboard
  2. Navigate to Dashboard > Organizations
  3. Select the target organization
  4. Click Generate link to create a shareable admin portal link

The generated link follows this format:

Portal link example
https://your-app.scalekit.dev/magicLink/2cbe56de-eec4-41d2-abed-90a5b82286c4_p
  • Expiration: Links expire after 7 days
  • Revocation: Revoke links anytime from the dashboard
  • Sharing: Share via email, Slack, or any preferred channel
  • Security: Anyone with the link can view and update the organization’s connection settings

Embed the admin portal Programmatic

Section titled “Embed the admin portal ”

Embed the admin portal directly in your application using an iframe. This allows customers to configure SSO and SCIM without leaving your app, creating a seamless experience within your settings or admin interface.

The portal link must be generated programmatically on each page load for security. Each generated link is single-use and expires after 1 minute, though once loaded, the session remains active for up to 6 hours.

npm install @scalekit-sdk/node

Use the Scalekit SDK to generate a unique, embeddable admin portal link for an organization. Call this API endpoint each time you render the page containing the iframe.

Express.js
6 collapsed lines
import { Scalekit } from '@scalekit-sdk/node';
const scalekit = new Scalekit(
process.env.SCALEKIT_ENVIRONMENT_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET,
);
// Generate portal link for organization
async function generatePortalLink(organizationId) {
const link = await scalekit.organization.generatePortalLink(organizationId);
// Use link.location as iframe src
return link.location;
}

The API returns a JSON object with the portal link and expiration details:

API response
{
"id": "8930509d-68cf-4e2c-8c6d-94d2b5e2db43",
"location": "https://random-subdomain.scalekit.dev/magicLink/8930509d-68cf-4e2c-8c6d-94d2b5e2db43",
"expireTime": "2024-10-03T13:35:50.563013Z"
}

The location property contains the portal URL to use as the iframe src.

Use the generated location URL as the iframe src to embed the admin portal in your application:

Embed portal in iframe
<iframe
src="https://random-subdomain.scalekit.dev/magicLink/8930509d-68cf-4e2c-8c6d-94d2b5e2db43"
width="100%"
height="600"
frameborder="0"
allow="clipboard-write"
>
</iframe>

Typically, you would embed the portal in your application’s settings or admin section where customers manage their authentication configuration.

  • Redirect URI: Ensure your application domain is listed as an allowed Redirect URI at Dashboard > Developers > API Configuration
  • iframe attributes: Include allow="clipboard-write" to enable copy-paste functionality within the portal
  • Dimensions: Set appropriate width and height for your UI (minimum recommended height: 600px)
  • Link expiration: Generated links expire after 1 minute if not loaded
  • Session duration: Once loaded, the portal session remains active for up to 6 hours
  • Single-use: Each generated link can only be used once to initialize a session

Match the admin portal to your brand identity. Customization applies to both shareable links and embedded portal implementations.

Configure these settings at Dashboard > Settings > Branding:

  • Logo: Upload your company logo (displayed in the portal header)
  • Accent color: Set the primary color to match your brand palette
  • Favicon: Provide a custom favicon for browser tabs

For additional customization options including custom domains, see the Custom domain guide.