Excuse the probably common problem but this has been vexing with no answers I can find anywhere:
When I use auth0-lock.js to login using a google-auth2 connection I do not get an idTokenPayload although the login is successful. When this is performed with a Username-Password-Connection the idTokenPayload is fully populated.
I am using a fully authorized Google Connection (not the development connection) and the login works but not the payload. When I test the google connection via Auth0 Dashaboard I get the full profile as expected for the login. My Auth0-lock configuration is as follows:
auth: {
params: { scope: āopenid profile emailā, prompt: āselect_accountā },
audience: āhttp://myhost/myapiā,
autoParseHash: true,
redirect: false,
responseType: āid_token tokenā,
sso: false,
rememberLastLogin: false,
allowedConnections: [āgoogle-oauth2ā, āUsername-Password-Authenticationā]
},
// login is performed as such
this.lock.on( "authenticated", _doAuthentication);
// With Google Login I get a blank idTokenPayload ... Username-Password works great
_doAuthentication( authResult ) {
this.lock.hide();
this.setTokens(
authResult.accessToken,
authResult.idToken
);
if( authResult.idTokenPayload['http://myhost.com/'] ) {
}
}
If been chasing this for over a month and cannot determine the reason ⦠especially frustrating as it works on the TryIt page with Google Connection.
Anyone have any idea?