-
I want to provide different data on given routes, based on parameters provided at login time. How to persist this data to the session? It seems like it's possible to accomplish this functionality by putting the data into the JWT token, but is there an idiomatic way to access it inside controller/templates? |
Beta Was this translation helpful? Give feedback.
Answered by
jwoertink
May 8, 2023
Replies: 1 comment 6 replies
-
There's a Lucky shard that lets you store session in redis, otherwise you're at the mercy of cookie limits with normal sessions. But provided your data doesn't get too crazy, just use session.set(:data, jwt) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having to make a lot of assumptions here since I don't have any of your code... but assuming you're using the
UserToken
class, then it's just in yoursrc/models/user_token.cr
file. Just open that file and make whatever changes you need to.