Replies: 2 comments
-
Or do I not need to distinguish different user sessions and directly use a list to store all sessions? |
Beta Was this translation helpful? Give feedback.
-
Logto's token storage is on the user client side. So it's designed in a way that there's only 1 user per client. If you want to store your tokens in, like you said, redis, then you should decode your ID token and get the Let me know if this works. Btw, I actually don't quite get why you want to store the tokens on a redis storage. Can you explain a little bit? |
Beta Was this translation helpful? Give feedback.
-
I only found set, get, and delete interfaces on Logto's Storage interface, which are operations for setting some keys for a single user's login information. So how can I distinguish different users? For example, if I want to use redis and define a redisStorage, how can I distinguish different users on the key?
After checking the source code, I found that the set keys are "idToken", "accessToken", and "refreshToken". So at this time, my idea is to use redis's hash format to store, user:xxx:session. My question is how to define this "xxx"?
Beta Was this translation helpful? Give feedback.
All reactions