Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dariuszparys/904d64978f9448f23bfb7698fee0cf6a to your computer and use it in GitHub Desktop.
Save dariuszparys/904d64978f9448f23bfb7698fee0cf6a to your computer and use it in GitHub Desktop.
sequenceDiagram
    participant User
    participant Browser
    participant AzureAD_B2C as Azure AD B2C
    participant IDP as Identity Provider
    participant App as Relying Party Application

    Note over User, Browser: Step 1: Access Sign Up or Sign In page
    User->>Browser: Access Sign Up/Sign In Page
    Browser->>AzureAD_B2C: Request Sign Up/Sign In Page
    AzureAD_B2C->>Browser: Return Sign Up/Sign In Page

    Note over User, Browser: Step 2: Enter credentials or select IDP
    User->>Browser: Enter credentials/select IDP
    Browser->>AzureAD_B2C: Submit credentials/IDP selection

    alt Local Account
        AzureAD_B2C->>AzureAD_B2C: Validate credentials
        AzureAD_B2C->>Browser: Prompt for additional claims (if needed)
        Browser->>User: Display additional claims form
        User->>Browser: Submit additional claims
        Browser->>AzureAD_B2C: Submit additional claims
    else Social IDP
        AzureAD_B2C->>IDP: Redirect to IDP
        IDP->>User: Display IDP login page
        User->>IDP: Enter credentials
        IDP->>AzureAD_B2C: Return user claims
    end

    Note over AzureAD_B2C: Step 4: Process user claims
    AzureAD_B2C->>AzureAD_B2C: Validate and transform claims
    AzureAD_B2C->>App: Send claims to relying party application

    Note over App, User: Step 5: User is authenticated
    App->>User: Welcome Page or Application Landing Page
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment