Hi Guys,
Has anyone been able to use Google OAUTH2? I've tried referencing the following details onto the "auth.config.ts" but not having much luck.
https://accounts.google.com/.well-known/openid-configuration
Hi,
just tested it (after I've not used Google as an id provider directly for a while). It works.
You can try it out with the following config:
// This api will come in the next version
import { AuthConfig } from 'angular-oauth2-oidc';
export const googleAuthConfig: AuthConfig = {
// Url of the Identity Provider
issuer: 'https://accounts.google.com',
// URL of the SPA to redirect the user to after login
redirectUri: window.location.origin + '/index.html',
// URL of the SPA to redirect the user after silent refresh
silentRefreshRedirectUri: window.location.origin + '/silent-refresh.html',
// The SPA's id. The SPA is registerd with this id at the auth-server
clientId: '1004270452653-m396kcs7jc3970turlp7ffh6bv4t1b86.apps.googleusercontent.com',
strictDiscoveryDocumentValidation: false,
// set the scope for the permissions the client should request
// The first three are defined by OIDC. The 4th is a usecase-specific one
scope: 'openid profile email',
showDebugInformation: true,
}
To test this, I've registered an application in the Google API Console. Its name is mentioned in the clientId property. I also had to set strictDiscoveryDocumentValidation to true.
Wishes,
Manfred
https://medium.com/@ishmeetsingh/google-auth-integration-with-angular-5-and-angular-oauth2-oidc-ed01b997e1df
Most helpful comment
Hi,
just tested it (after I've not used Google as an id provider directly for a while). It works.
You can try it out with the following config:
To test this, I've registered an application in the Google API Console. Its name is mentioned in the clientId property. I also had to set
strictDiscoveryDocumentValidationto true.Wishes,
Manfred