manfredsteyer / angular-oauth2-oidc

Support for OAuth 2 and OpenId Connect (OIDC) in Angular.
MIT License
1.9k stars 688 forks source link

silent refresh error parameters in event reason object #1154

Open remkoboschker opened 3 years ago

remkoboschker commented 3 years ago

Describe the bug

Silent refresh error has a different format for reporting the reason of the error.

Expected behavior

I expect the silient_refresh_error to contain the error in event.params.error

remkoboschker commented 3 years ago

I noticed the code_error event is actually nested as reason in the silent_refresh_error event.

{
   type: 'silent_refresh_error'
   reason: {
       type: 'code_error'
       params: {
          error: 'login_required'
      }
}

Is that correct and is the reason always another OAuthErrorEvent?

jeroenheijmans commented 3 years ago

Thx for reporting. Did you trace this back to the code somewhere yet?

My assumption had always been that this library doesn't touch the error object structure, and that it is in fact the Identity Server behavior that determines the format (and I'm not sure if that's standardized?)