manfredsteyer / angular-oauth2-oidc

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

When logged in, cannot manually change url in browser #1290

Open Fl0r14n opened 1 year ago

Fl0r14n commented 1 year ago

Describe the bug by specifying responseType: 'code' for example, when token exists, will do some sort of page refresh behind the scenes with the same url. This will prevent manual navigation to another url.

By enabling tracing in router one will get a NavigationCancel envent with the message: Navigation ID 1 is not equal to the current navigation id 2

Log example

image

To Reproduce Do a authorization flow login. From the browser try to manually change the url to a another valid route. The browser remains on the old page

Expected behavior The browser loads the requested page

Desktop (please complete the following information):

Additional context Reproducible only for authorization code flow. Implicit works fine by setting oidc: true, requestAccessToken: true, but not responseType. The instant responseType is provided the above happens

Fl0r14n commented 1 year ago

tested with spartacus and "angular-oauth2-oidc": "^12.1.0",