This documentation site is about the unstable (upcoming) Comentario version.
Switch to the stable version »
Login via Google
How to configure OAuth2 login via Google
To let your users sign in with their Google account, follow the below steps.
- Register a Google Developer account.
- Navigate to Google Cloud console.
- Go to APIs and services ⇒ Credentials.
- Click Create credentials in the top toolbar, then choose OAuth client ID:
- Configure the application:
- Choose Web application as application type and give it a name.
- Add your Comentario domain as authorised JavaScript origin.
- Add Google callback URL
https://<your-comentario-domain>/api/oauth/google/callback
as authorised redirect URI.
- Click Create:
- You will be presented the two values: the Client ID and the Client secret. Store them in a safe place for future reference:
- Update the secrets configuration with the above data:
...
idp:
google:
key: 1036387968558-f005cfkbt9c15a4hcu65vetb0j0h0p4a.apps.googleusercontent.com
secret: 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
...
- Restart Comentario. You should now see Google under Configured federated identity providers on the Static configuration page of the Administration UI.
- Still in the Admin UI, navigate to the desired domain properties and tick off Google on the Authentication tab, then click Save.
That’s it! Your users should now be able to login using the Google button in the Login dialog.