angular-oauth2-oidc: OAuthService config is null after the page is reloaded
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:

Is this the expected behavior? Should I call the configure method again if the config is null ?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20 (1 by maintainers)
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.