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
- Prevent Appwrite from pulling weekly unu...
Hi, I only use node/php runtimes for functions and static-1/node for site. However, appwrite keeps pull gigabytes of runtimes. It makes my VM backup unnecessar...
- Dart Runtime as Function is missing
Hey guys, I set the _APP_FUNCTIONS_RUNTIMES to dart-3.10 and redeployed the appwrite stack but unfortunately the dart runtime doesnt show up. I copied the val...
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...