Angular-oauth2-oidc: Silent refresh fails with multiple connected google accounts

Created on 20 Nov 2018  路  3Comments  路  Source: manfredsteyer/angular-oauth2-oidc

I am experiencing this issue using login with google account.

After login:

  • silent refresh is working fine if the browser has only one connected google account in memory;
  • silent refresh is _NOT_ working if the browser has multiple connected google account in memory, and the error raised is:
{
   type: "token_error", 
   reason: { type: "token_error" }, 
   params: { 
      error: "interaction_required",
      error_subtype: "access_denied",
      state: "vYMEQNl8X5vz5hcecJreCEZ7vYMi99Y7KwzxkN5W"
   }
}

Is this the right behavior of oidc?
I thought that after selection of user on the first login attempt, the correct account was recognized by silent refresh.

Thank you!

future-version

Most helpful comment

Looks like it's solved passing login_hint = loggedUserEmail to setupAutomaticSilentRefresh method.

@manfredsteyer I think that login_hint should be passed by default in the scenario of silent refresh, do you agree?

this.oauthService.setupAutomaticSilentRefresh({
      login_hint: this.authProfile['email']
});

All 3 comments

Looks like it's solved passing login_hint = loggedUserEmail to setupAutomaticSilentRefresh method.

@manfredsteyer I think that login_hint should be passed by default in the scenario of silent refresh, do you agree?

this.oauthService.setupAutomaticSilentRefresh({
      login_hint: this.authProfile['email']
});

Thanks for this hint.

Cleaning up old issues. Feel free to comment for reopen, or open a fresh issue if that makes sense.

Was this page helpful?
0 / 5 - 0 ratings