Skip to main content
Version: Java

How it Works

This guide explains how the Magical Auth API works and provides an overview of the authentication process. It covers the key concepts, components, and steps involved in using the Magical Auth API to verify users.

Flow Diagram

The Magical Auth API follows a sequence of steps to verify users and authenticate them securely. The flow diagram below illustrates the key steps involved in the Magical Auth authentication process.

Subscription Page

Magical Auth Sequence

The sequence diagram below provides a detailed breakdown of the interactions between the End User (App Client), the App, and Glide Identity during the Magical Auth authentication process.

Step by Step

  • End User Initiates Verification:
    • The flow begins with the End User (App Client) triggering a user verification request to the App. This indicates that the user wants to start the authentication process.
  • App Sends Authentication Request to Glide Identity:
    • Upon receiving the verification trigger, the App sends a startAuth request to Glide Identity. This request specifies that the App is initiating a magic authentication flow.
  • Glide Identity Sends Authentication Response to App:
    • Glide Identity processes the startAuth request and returns a magicAuthStartResponse to the App. This response contains the authUrl needed for the next steps.
  • App Forwards Auth URL to End User:
    • If the response type is Magic, the App sends the authUrl from the magicAuthStartResponse to the End User. The End User needs this URL to continue the authentication process.
  • End User Makes Request to Glide's OIDC Server:
    • The End User uses the authUrl to make a request to Glide’s OIDC server. This is where the actual authentication happens.
  • Glide Identity Returns Token to End User:
    • After successful authentication, Glide’s OIDC server issues a token to the End User. This token serves as proof of the user's successful authentication.
  • End User Sends Token Back to App:
    • The End User sends the token back to the App, completing their part of the authentication process.
  • App Verifies Authentication with Glide Identity:
    • The App forwards the token to Glide Identity with a verifyAuth request, asking Glide Identity to confirm the validity of the token and verify the user.
  • Glide Identity Returns Verification Result to App:
    • Finally, Glide Identity processes the verifyAuth request and sends a response back to the App, indicating whether the user has been verified successfully or not.