Admin Login

Implement elevated OAuth login for platform and organization administration

AuthOS release 0.8.2 TypeScript SDK 0.8.0 Latest-only documentation
Updated Jul 15, 2026 Edit this page
On this page

Complete the authentication flow prerequisites before adding an administration login.

Admin Login (Platform & Organization Admins)

Platform owners and organization admins use a separate authentication flow with dedicated OAuth credentials managed by the platform.

When to Use Admin Login

  • Platform owner dashboard
  • Organization administration panel
  • Service configuration interfaces
  • Any interface that requires elevated privileges

Implementation

// Generate admin login URL
const adminLoginUrl = sso.auth.getAdminLoginUrl('github', {
  org_slug: 'acme-corp' // Optional: redirect to specific org after login
});

// Redirect admin to authenticate
window.location.href = adminLoginUrl;

// The callback handling is identical to end-user flow
// Tokens are returned in the same way

Admin Login with Organization Context

// Example consumer-application admin component
export function AdminDashboard() {
  const handleAdminLogin = () => {
    // After login, user will be directed to acme-corp dashboard
    const loginUrl = sso.auth.getAdminLoginUrl('github', {
      org_slug: 'acme-corp'
    });
    window.location.href = loginUrl;
  };

  return (
    <div>
      <h1>Admin Panel</h1>
      <button onClick={handleAdminLogin}>Sign in as Admin</button>
    </div>
  );
}

Key Differences from End-User Flow:

  • Uses platform OAuth credentials instead of tenant credentials
  • Grants admin-level permissions
  • Can access platform-wide resources
  • JWT contains admin role claims