jso icon indicating copy to clipboard operation
jso copied to clipboard

How to parse an id_token parameter in the response

Open marschaeffer opened this issue 5 years ago • 3 comments

Our keycloak returns an auth-token via the "id_token" parameter after login, but src/JSO.js:278 parses only the "access_token" parameter in the url.

https://github.com/andreassolberg/jso/blob/b1be102c5c8eedb15c38dea2ba56d83b749eed94/src/JSO.js#L278

Is there some advice how to make parsing an id_token possible with JSO (response_type=id_token)? Thanks!

marschaeffer avatar Aug 30 '19 08:08 marschaeffer

Have you found solution? I have same problem with (latest) Keycloak.. Auth flow is ok untill comes back to callback URI with this error.

ViltusVilks avatar Jan 30 '20 03:01 ViltusVilks

@ViltusVilks I copy/pasted JSO.js in my project and changed it to my needs. Actually too specific changes to open a PR. (Please be aware that it is not recommended to store tokens in the browsers storage, like JSO does. I moved to auth0-spa-js, but needed to change a lot there as well (it is very specific for auth0 openid software)).

marschaeffer avatar Feb 03 '20 08:02 marschaeffer

How much did you have to change with auth0? I was looking at that as an alternative.

dosstx avatar Feb 03 '20 13:02 dosstx