You can enable users to sign up and sign in using their Google credentials. To set this up, you need a Google cloud account and project, and a little technical know-how.
Note that Google has provided a topic about Google’s Create authorization credentials, but the steps don’t quite work. Until they update their docs, we recommend you use ours.
⚠️ Google does not allow sign in auth to work in webview
Before connecting Google as a sign in option, be aware that Google does not support auth in webview. This means if a user opens a sign in window to your app in a webview (say via Instagram or from Facebook) they will receive an error.
- Create a Google Cloud account.
- Create a Google Project.
- Get Google credentials (see below).
- Sign in to Kinde.
- Go to the Settings page and select Authentication.
- In the Social connections section, select Add connection.
- In the window that opens, select Google, then select Save.
- On the Google tile, select the Configure link.
- In the Callback URL section:
- If you use Kinde’s domain as your default, copy the Kinde domain URL.
- If you use a custom domain (and want to use it as the callback) select the Use custom domain instead switch and copy the Custom domain URL.
- Use the copied Callback URL to set up the app, see below.
- Navigate to the Google Cloud home page.
- Click Console in the top menu bar.
- In the left menu, select APIs & Services.
- If you are prompted to, create a new project.
- Select Oauth consent screen.
- Select if your project is Internal or External, then select Create.
- Complete all the app details (noting that you may need to go through the verification process if you upload a logo).
- Select Save and Continue.
- In the Scopes step, select Add or remove scopes.
- In the screen that appears, add the following non-sensitive scopes:
./auth/userinfo.email
and./auth/userinfo.profile
then select Update. - Select Save and continue.
- Add test users if you want, then select Save and continue.
- Back in the main menu, select Credentials.
- Click Create Credentials at the top of the page and select OAuth client ID.
- In the Web application dropdown menu, choose Web Application.
- Name your OAuth 2.0 client.
- Add your Authorized redirect URIs. These are the Callback URLs you copied in the previous procedure.
- Click Create.
- Copy your Client ID and Client Secret from the confirmation window.
- Sign in to Kinde.
- Go to the Settings page and select Authentication.
- On the Google tile, select the Configure link.
- Paste your Client ID and Client Secret into the two fields.
- Save the form. Your users will now be able to sign in using their Google credentials.