Google OAuth (Gmail)
To use Google OAuth, you will need to create a Google Cloud Platform project and enable the Google Identity and Access Management (IAM) API. You will also need to create a new OAuth client ID and download the client secret.
Create and configure a new OAuth client ID
- Go to the Google Cloud Platform Console (opens in a new tab)
- From the projects list, select a project or create a new one
- If the APIs & services page isn't already open, open the console left side menu and select APIs & services
- On the left, click Credentials
- Click New Credentials, then select OAuth client ID
- When prompted to select an application type, select Web application
- Enter a name for your client ID, and click Create
- Click the download button to download the client secret
- Set the authorized javascript origins to
https://<documenso-domain>
- Set the authorized redirect URIs to
https://<documenso-domain>/api/auth/callback/google
- In the Documenso environment variables, set the following:
NEXT_PRIVATE_GOOGLE_CLIENT_ID=<your-client-id>
NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=<your-client-secret>
Finally verify the signing in with Google works by signing in with your Google account and checking the email address in your profile.