Skip to main content

Google

To set up the Google OAuth provider, please go to the Google API console and log in using your Google account.

Setting up the project

Next, navigate to the OAuth consent screen tab to configure the OAuth consent screen.

Configure consent

Register your Google app by following these steps:

Registering the app

Afterward, go to the Credential tab.

Credentials

Create a credential for your app:

Creating a credential

Ensure that you set the Authorized redirect URIs correctly

In the Google OAuth configuration, the Authorized redirect URIs must be set to your Casdoor's callback URL, while the Redirect URL in Casdoor should be set to your application's callback URL.

For more details, please refer to the App configuration.

After creating the Client ID, you will obtain the Client ID and Client Secret.

Client

Add the Google OAuth provider and enter the Client ID and Client Secret in your Casdoor.

Google Provider

If Get password is enabled, you should enable google people api first and add scope https://www.googleapis.com/auth/user.phonenumbers.read

Google People Api

Google Provider Scope

You can now use Google as a third-party service to complete authentication.