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.
Magical Auth Sequence
The sequence diagram below provides a detailed breakdown of the interactions between the End User (App Client), the App, and Glide 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:
- Upon receiving the verification trigger, the App sends a
startAuth
request to Glide. This request specifies that the App is initiating a magic authentication flow.
- Upon receiving the verification trigger, the App sends a
- Glide Sends Authentication Response to App:
- Glide processes the
startAuth
request and returns amagicAuthStartResponse
to the App. This response contains theauthUrl
needed for the next steps.
- Glide processes the
- App Forwards Auth URL to End User:
- If the response type is Magic, the App sends the
authUrl
from themagicAuthStartResponse
to the End User. The End User needs this URL to continue the authentication process.
- If the response type is Magic, the App sends the
- 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.
- The End User uses the
- Glide 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:
- The App forwards the token to Glide with a
verifyAuth
request, asking Glide to confirm the validity of the token and verify the user.
- The App forwards the token to Glide with a
- Glide Returns Verification Result to App:
- Finally, Glide processes the
verifyAuth
request and sends a response back to the App, indicating whether the user has been verified successfully or not.
- Finally, Glide processes the