Response Type 'id_token' in implicit flow
See original GitHub issueI’m trying to do the implicit flow with response_type
id_token
and requestAccessToken: false
.
The library is throwing the error ‘Error validating tokens’ in ‘angular-oauth2-oidc.js:1785’.
My AuthConfig:
export const authConfig: AuthConfig = {
issuer: environment.url,
skipIssuerCheck: true,
redirectUri: window.location.href,
clientId: environment.clientId,
responseType: 'id_token',
requestAccessToken: false,
scope: 'openid groups',
showDebugInformation: true,
};
Versions:
- “angular-oauth2-oidc”: “^9.2.0”,
- “angular-oauth2-oidc-jwks”: “^9.0.0”,
Entire stack trace:
TypeError: Cannot read property 'words' of undefined
at init.concat (jsrsasign.js:26)
at Object._append (jsrsasign.js:26)
at Object.update (jsrsasign.js:26)
at push../node_modules/jsrsasign/lib/jsrsasign.js.KJUR.crypto.MessageDigest.updateString (jsrsasign.js:242)
at push../node_modules/jsrsasign/lib/jsrsasign.js.KJUR.crypto.MessageDigest.digestString (jsrsasign.js:242)
at JwksValidationHandler.calcHash (angular-oauth2-oidc-jwks.js:118)
at JwksValidationHandler.<anonymous> (angular-oauth2-oidc.js:100)
at Generator.next (<anonymous>)
at tslib.es6.js:74
at new ZoneAwarePromise (zone-evergreen.js:960)
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'words' of undefined
TypeError: Cannot read property 'words' of undefined
at init.concat (jsrsasign.js:26)
at Object._append (jsrsasign.js:26)
at Object.update (jsrsasign.js:26)
at push../node_modules/jsrsasign/lib/jsrsasign.js.KJUR.crypto.MessageDigest.updateString (jsrsasign.js:242)
at push../node_modules/jsrsasign/lib/jsrsasign.js.KJUR.crypto.MessageDigest.digestString (jsrsasign.js:242)
at JwksValidationHandler.calcHash (angular-oauth2-oidc-jwks.js:118)
at JwksValidationHandler.<anonymous> (angular-oauth2-oidc.js:100)
at Generator.next (<anonymous>)
at tslib.es6.js:74
at new ZoneAwarePromise (zone-evergreen.js:960)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41344)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
at invokeTask (zone-evergreen.js:1621)
Best regards Nick
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
OAuth 2.0 implicit grant flow - The Microsoft identity platform
Microsoft identity platform and implicit grant flow ... This id_token+code response is sometimes called the hybrid flow.
Read more >Implicit Flow with Form Post - Auth0
Learn how the Implicit flow with Form Post works and why you should use it for traditional web apps that need only an...
Read more >What is the OAuth 2.0 Implicit Grant Type? - Okta Developer
The Implicit Grant Type is a way for a single-page JavaScript app to get an access token without an intermediate code exchange step....
Read more >Implicit Flow - Cidaas-Articles
When using the Implicit Flow, this value is id_token token or id_token. The meanings of both of these values are defined in OAuth...
Read more >Draft: OpenID Connect Implicit Client Implementer's Guide 1.0
The OP responds with an ID Token and usually an Access Token. ... In the Implicit Flow, the entire response is returned in...
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
@jeroenheijmans The issue can be closed.
I debugged through the code and found the error. There is no at_hash in my id token. I set the property “disableAtHashCheck” in the AuthConfig to true and now it is working.
I think in case of response_type “id_token” in implicit flow the at_hash check should be disabled by default. I created a pull request for this case. (https://github.com/manfredsteyer/angular-oauth2-oidc/pull/808)