Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step-by-Step Authentication Process



...

Step 1: User Visits Protected Page

What happens:

Who's involved:

  • End User (Browser)
  • Blazor WebAssembly App

Result:

  • Blazor app checks if user has a valid token in sessionStorage
  • No token found → Proceed to Step 2

Step 2: Redirect to Login

What happens:

  • MSAL.js detects no authentication
  • Saves the original URL (e.g., /overview) to return later
  • Redirects browser to Microsoft login page

Who's involved:

  • MSAL.js Library
  • Microsoft Entra ID

Redirect URL:

https://6073ce8b-73f3-4df4-9b80-5e40cdc6965f.ciamlogin.com/.../authorize
  ?client_id=84c38b43-12e4-4c26-8292-8910d79aa532
  &redirect_uri=https://partners.egzynergy.com/authentication/login-callback
  &response_type=code

Result:

  • User sees Microsoft login page

...


Step 3: User Enters Credentials

...

  • App now has three tokens (access, refresh, ID)

...


Step 6: Store Tokens

What happens:



  • MSAL.js stores all tokens in browser's sessionStorage
  • Tokens are encrypted/encoded but not visible to user
  • sessionStorage means tokens deleted when browser tab closes

...