question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OAuthService config is null after the page is reloaded

See original GitHub issue

I’m trying to logout using the logOut method provided by OAuthService. Everything works fine, but if for some reason the user reloads the page (e.g. by pressing F5) before they try to log out, I get this message:

ERROR TypeError: Cannot read property 'customTokenParameters' of null at OAuthService.logOut (angular-oauth2-oidc.js:2128)

I double-checked and all the information stored in “Session Storage” is removed, but the user is not redirected to the logoutUrl because of the error described above. I also did a little bit of debugging in the logOut method and that’s when I found that the config property is null as it is shown in the following image:

image

Is this the expected behavior? Should I call the configure method again if the config is null ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
axell9641commented, Jul 8, 2020

See my initial comment: this is unexpected, and as far as I know this does not happen in my own applications.

OK, thank you. I’m going to take a look this branch in your example and then try to create an example with my own configuration , but using your indentity server and see if I can reproduce the error.

0reactions
jeroenheijmanscommented, Sep 24, 2020

I think the Original Poster @axell9641 abandoned this issue, or maybe worked around it.

I will close this issue since interaction died down. @pyronlaboratory if you were pinging because you had similar symptoms, I recommend opening up a fresh issue with your specific scenario and steps to reproduce the error, so the community can give it a fresh look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular-oauth2-oidc token always invalid after log in
Logging in seems to work just fine i get the redirect to the page log in and get redirected home: this.oauthService.
Read more >
Silent Refresh - angular-oauth2-oidc
This is a well-known solution that compensates the fact that implicit flow does not allow for issuing a refresh token. It uses a...
Read more >
Client API - NextAuth.js
The NextAuth.js client library makes it easy to interact with sessions from React applications.
Read more >
OAuth Connections - Tableau Help
For a subset of connectors, you can configure site-level OAuth by configuring custom OAuth clients. For more information, see one of the following...
Read more >
Implicit flow authentication using angular-oauth2-oidc (Angular)
Implicit Flow configuration & Login page ... just call the following method after configuring the OAuthService in the AppComponent.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found