Documentation Index
Fetch the complete documentation index at: https://docs.magic.link/llms.txt
Use this file to discover all available pages before exploring further.
Usage
If your users are encountering an “Access blocked: magic.link has not completed the Google verification process” error, please read below.
Prerequisites
- You will need a Google Developer account
- You will need to have the Magic SDK installed into your web app
- You will need to have the Magic SDK - OAuth Extension installed into your web app
Google Setup
After installing the OAuth extension, you can now enable Google Login for your Magic app:- Follow Google’s instructions to set up an OAuth 2.0 app
- Obtain the OAuth Client ID and Client Secret from your Google Developer dashboard
- Go to your Magic Dashboard
- Select the Magic app for which you’d like to enable Google Login, or create a new app
- Navigate to Social Login from the sidebar
- Click the toggle for Google / Gmail
- Input the Client ID and Client Secret for your OAuth app
-
Add your Redirect URI to your Google Dashboard’s OAuth app configuration:
If you’re using
loginWithRedirect, add the Redirect URI you are passing as the redirectURI argument:JavaScriptIf using the connectWithUI SDK method
Choose “Magic Login Widget” in your Magic Dashboard’s Google OAuth settings and copy the Redirect URI field from your Magic Dashboard. Add this Redirect URI to your Google Dashboard’s OAuth app configuration:
- In Magic Dashboard, click “Save”
- Click “Test Connection” to give your new Google OAuth flow a try!
OAuth Redirect
The standard Google sign-in flow redirects users to Google’s OAuth screen and back to a callback URL on your site.JavaScript
Google One Tap
Google One Tap shows an inline sign-in prompt embedded on your page, so users never leave your app during sign-in. You integrate Google Identity Services (GSI) on your site, receive a Google-issued ID token (JWT), and pass it to Magic vialoginWithGoogleIdToken. Magic verifies the token and returns a session — and because identity resolution runs through the same Google OAuth provider as the redirect flow, One Tap users resolve to the same Magic user and wallet as redirect-flow users automatically.
This requires @magic-ext/oauth2 v15.8.0 or higher.
Implementation
1
Add a Google Identity Services helper
Magic does not bundle Google Identity Services — your app loads the GSI client library and obtains the ID token, then passes it to Magic for verification. Save the following as You’ll also need to add your app’s origin (for example
gsi.js (or wherever you keep client utilities). It loads the GSI script the first time it’s called, shows the One Tap prompt, and returns the resulting Google ID token as a Promise.JavaScript
https://your-app.com and http://localhost:3000 for local development) to Authorized JavaScript origins on your OAuth 2.0 Client ID in the Google Cloud Console — GSI requires it.Refer to Google’s One Tap documentation for advanced configuration (auto-select, FedCM, cooldowns, button rendering, etc.).2
Log in with Magic
Call the helper to obtain the JWT, then pass it to
loginWithGoogleIdToken along with the same Google Client ID. Magic verifies the token’s signature, issuer, and audience against Google, then returns a DID token you can use with the Admin SDK to verify the user on your backend.JavaScript
Method reference
Other Google Identity Services flows
TheloginWithGoogleIdToken method accepts any Google-issued ID token, so it works with any Google Identity Services flow that returns an id_token credential:
- One Tap prompt —
google.accounts.id.prompt()(shown above) - Sign in with Google button —
google.accounts.id.renderButton(...)for a customer-rendered button instead of the auto-prompt
Verification Process
If your users are encountering anAccess blocked: magic.link has not completed the Google verification process error, you will need to navigate to your Google developer dashboard and change your app’s “Publishing status” from “Testing” to “In production”.

- Go to your app within the Google developer dashboard and select “OAuth consent screen” on the nav menu.
- Under “Publishing status”, select “publish app”.
- Once the status is set to “In production”, you should no longer be encountering the error.
If your app meets certain criteria, you might be required to go through a verification process. To avoid this, we recommend removing any icons or logos you have added in the Google developer dashboard.
- You want your application to display an icon or app name
- Your app requests authorization of any sensitive or restricted scopes
- The number of authorized domains for your apps exceeds the domain count limit for a project
- There are changes to the OAuth consent screen after your app has been approved

Gmail Linking
A user’s email login and Google social login can automatically be linked so that logging in with either auth factor will resolve to a single wallet. This applies to both the OAuth Redirect and One Tap flows above.Each login counts towards a unique monthly active wallet for billing purposes.