Pre-requisites

First, you’ll need to enable user authentication within Mage. You can find out more about this in the Overview page.

Enable Google sign in

Mage will request access for the following scopes:

https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile

By default, users will not see the “Sign in with Google” option in their sign in page.

1

Add Oauth application

You will need to add Mage as an OAuth client in your Google Cloud Platform project. For more instructions on how to do this, please see the Google Cloud Platform documentation.

2

Retrieve credentials

Once you have created the credentials, you will need to get the application’s client ID and client secret. You will also need to add http(s)://<your-mage-url>/oauth as an authorized redirect URI.

3

Set environment variables

Set the following environment variables in your Mage setup.

NameValue
GOOGLE_CLIENT_ID<client id>
GOOGLE_CLIENT_SECRET<client secret>

You should now see the “Sign in with Google” button when you start Mage and attempt to sign in.

Was this page helpful?