Setting up Google Sign-in
- Navigate to the Google Cloud Platform console and click on your project/create a new project.
-
Navigate to “APIs & Services” on the left pane and click on Credentials.
-
If using an existing OAuth client, select it. Otherwise, click “Create Credentials” with OAuth Client ID option, and select “Web Application”.
-
Set “Authorized JavaScript origins” to your site’s URL (or http://localhost:3000 for testing).
-
If creating a new OAuth client, click Create and keep the Client ID given.
-
Navigate to “OAuth consent screen” on the left pane. Change the user type to “External” with “Testing” publishing status. This allows emails outside the Blueprint org to login.
-
Add Test Users for local development.
-
Navigate to the Firebase console for your project -> Build -> Authentication.
-
Click the Sign-in method tab and enable the Google provider.
- Add the OAuth Client ID to your frontend .env file. Otherwise, your Google login button will be greyed out on the frontend.
REACT_APP_OAUTH_CLIENT_ID=<insert-your-client-id>