SSO
Overview
For SSO (Single Sign-On) we use the OAuth2 'authorization code' flow.
We often call this 'platform SSO', as we make use of the CX platform's OAuth2 support when available, but it can also be used with any OAuth2 provider, like Azure Entra ID SSO
Platform SSO Flow
The following sequence diagram describes the platform SSO flow:
Flow Steps
- Initiate SSO: Agent requests SSO authentication via
/platform/sso - Read Configuration: Deepdesk reads Auth URL and Client ID from platform config
- Authorization Request: Deepdesk redirects to platform's authorization endpoint
- Agent Authentication: Platform presents login page to agent
- Authorization Code: Platform returns authorization code to Deepdesk
- Token Exchange: Deepdesk exchanges authorization code for access token using Client ID, Client Secret
- User Information: Deepdesk retrieves user information from platform
- User Creation/Login: Deepdesk creates or logs in the user
- JWT Creation: Deepdesk creates account JWT token
- Session Establishment: Deepdesk returns session and access token cookie to agent
User Journey
-
Sign-In Initiation: The agent is logged into the CX platform and sees an overlay above the input field with a button "Sign in to Deepdesk"
-
OAuth Flow: When the agent clicks the link, Deepdesk performs the OAuth flow with the platform (as detailed in the sequence diagram above)
-
Automatic Login: Upon successful OAuth authentication, the user is automatically logged in to Deepdesk
-
Return to Platform:
- The agent returns to the CX platform
- After refreshing, the agent sees Deepdesk suggestions and can start using the platform
Implementation
For technical implementation details, see:
See Also
- OAuth2 Roles - Automatic role assignment using OIDC claims
- Magic Link - Email-based passwordless authentication