Cannot read property 'split' of undefined ... OAuthService.storeAccessTokenResponse
See original GitHub issueHi,
Thanks a lot for the update to support Angular 6. However, after updating I get this error when I try to login:
ERROR TypeError: Cannot read property 'split' of undefined
at OAuthService.push../node_modules/angular-oauth2-oidc/esm5/angular-oauth2-oidc.js.OAuthService.storeAccessTokenResponse (angular-oauth2-oidc.js:1039)
at SafeSubscriber._next (angular-oauth2-oidc.js:625)
at
Here’s my config:
export const authConfig: AuthConfig = {
issuer: 'http://localhost:5000',
clientId: 'ngclient',
dummyClientSecret: 'secret',
scope: 'openid profile roles webApi offline_access',
showDebugInformation: true,
oidc: false
};
My token endpoint is only returning:
{
access_token: 'eyJhbGciOiJSUz.....',
expires_in : 3600,
refresh_token: 'd4f06feb10391....',
token_type : "Bearer"
}
Am I doing something wrong?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Cannot Read Property 'split' of Undefined - freeCodeCamp
it will throw the TypeError: Cannot read property 'split' of undefined error. The split method. When split is called on a string, it...
Read more >How to prevent cannot read property split of ... - Meticulous
An article about the error 'cannot read property split of undefined' and various techniques to prevent it.
Read more >OAuthService - angular-oauth2-oidc
Service for logging in and logging out with OIDC and OAuth2. Supports implicit flow and password flow. Extends. AuthConfig. Index. Properties.
Read more >JWT Cannot read Property 'split' of undefined - Box Support
Hi Everyone, I'm trying to use the Node SDK for JWT Authentication in a React App (and using Webpack). I'm running into the...
Read more >TypeError: Cannot read Property 'split' of Undefined in JS
The "Cannot read property 'split' of undefined" error occurs when trying to call the `split()` method on a variable that stores an `undefined`...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have also seen this problem. The problems is already fixed in the https://www.npmjs.com/package/angular-oauth2-oidc-codeflow fork.
Thanks for pointing this out and the PR. I’ve just published a new version 4.0.1 with a fix for this.