Hi all, does anyone know if there is an endpoint i...
# talk-hydra
l
Hi all, does anyone know if there is an endpoint in the api to get the access_token from this data? I am using "oid-client" library, everything works correctly but the token data is stored in a session storage so when I open a new tab it does not find the token and re-launches the process. If not, do you recommend to save it in the LocalStorage?
f
hey, looking on your printscreens your lib stores is in the local storage, then you should use in your web app sth like
window.localStorage.getItem
Hydra does not touch your session and local storage and it shouldn’t have therefore no API on hydra side 🙂
type it first in the developer console in your browser to test manually and play around
l
Thank you @famous-art-85498 but I would like when I open a new tab to reuse the localStorage data to retrieve the active token and set in Session Storage to prevent generate a new one. That's why I wonder if it is possible to retrieve an access token from this data.
Copy code
authority: "<http://localhost:4444>"
client_id: "platform"
code_verifier: "60c2c9ab24dc4f87b16a334160aac9f985f0dd3235de4972871b9e327bb10a9280a3d8793f994bb396a1eafe4ecdcc17"
created: 1658847534
extraTokenParams: {}
id: "0400f4482ee342928ae881c6efda76f9"
redirect_uri: "<http://localhost/callback.html>"
request_type: "si:r"
response_mode: "query"
scope: "openid profile masterdata.api"
f
then you need to rely on browser API in general as you are putting it to the storage
the payload you have added looks like a token request info
and the token itself you have in session storage according to your print screen