Skip to content

I'm lost! Login via JWT is blocked for missing session[:account_id]? #263

Answered by janko
pboling asked this question in Q&A
Discussion options

You must be logged in to vote

Rodauth operates with the session object as a hash, which should support all Rails session stores (cookie, redis, Active Record etc). In what way does the Redis session store not work you?

JWT mode doesn't actually use Rails session, as you can see from the implementation. It stores session data in a plain hash, which ends up in the JWT token payload. This enables it to work exactly the same way as with Rails session, just with the JWT token acting as session data storage.

I couldn't reproduce the routing constraint not working with JWTs. I made the below changes to the demo app, and accessing an authenticated route worked. Can you reproduce the issue in a fresh Rails app with a failing i…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pboling
Comment options

Answer selected by pboling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants