-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Seesion Store using Redis #250
Comments
Hi @dasarindam
Have a look at the example Obtaining access tokens to call external APIs and let me know if that answers your question |
I have done the above solution and works fine. |
Hey @dasarindam - you can get everything you need from the session data to read user claims and access an api using the app.use('callAPI', req,res) => {
req.oidc.user; // user
req.oidc.accessToken; // accessToken
} What do you need the Redis session key and Redis data directly for? |
I need this key and the data for further API call. It looks like after some call I am loosing the accessToken. I am trying to get the "SessionKey" value to track all the further call. The value is storing successfully. But not able to read the value of "SessionKey". req.oidc object does not hold this. |
As long as the user is logged in (you have session data in redis), you will always be able to get the access token from the API: |
OK. Thats fine for now. I will provide a sample code, so that you may be able to reproduce. |
Thanks @dasarindam There is currently no way to get the value of "SessionKey" - but once #252 get's released (I'll try and cut a release this week) you should be able to make the "SessionKey" value predictable |
Custom Session Key generation is available in the latest release https://github.com/auth0/express-openid-connect/releases/tag/v2.5.0 |
Hi Team ,
I am trying to create a app where I thought of saving the token in the session and reuse the same in other different API call. Pls can some one said if this is the right way ? Is this implementation is the correct way ? Does session has been declared in coreect place ? TIA
index.js
openauth.init()
openauth.js
The text was updated successfully, but these errors were encountered: