What's your go-to path for JWT tokens?
I currently store the a_session_projectid as a cookie, but secure and without HTTPOnly. Normally you should use HTTPOnly but I don't want to create a new JWT token for every request. Or should I?
The token is as you said 15 minutes valid. Do I store it for 15 minutes and create a new one after that? Do I check for the JWT validation the entire time to create a new one? ๐
or do I just create a JWT token every time I do a request? (Which is a lot)
I think in general, the JWTs are really intended for one-off use where a function/script needs to act as a specific User
They're not really intended for long-term use
So you think the a_session_projectid token should just be without HTTPOnly?
In general, sensitive tokens should be with, however this makes it unreadable for JS
(and there's only one token ๐ )
I think you should probably be using the Cookies instead
The header?
Yeah. Cookie auth is intended to be used the way you're using JWTs
Thanks, will do!
If your issue has been solved, you can close this post by adding โ[SOLVED]โ to the beginning of the title
You actually opened up a whole new scene for me haha. I am really grateful. Thanks!
[Solved] Go-to path for JWT tokens
Recommended threads
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- local build `composer installer:dev` iss...
setup - dev container (default linux universal) WSL (test with gh codespace too) - php 8.5.7 - all extensions installed - `composer install` fine - `composer...
- Function global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...