-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌 Feature: Introduce Custom JWT Expiration Date Support #7602
Comments
Assuming you're using one of the login methods (In your case createEmailSession), Can you not store the session/token/jwt in browser after createEmailSession and get the session ID and use: Also see https://appwrite.io/docs/references/cloud/models/session Not tried this personally so apologies if you've tried already. Perhaps it's worth a discussion on whether the libraries should handle how to store tokens/sessions locally and handling refreshing? |
If you're looking for configurable JWT durations, please add a 馃憤馃徏 to #5263. Btw, we're working on some changes that allow better session handling in custom backends. Stay tuned for that. For now, I'm going to close this as a duplicate. |
馃敄 Feature description
I have my own API server that communicates with the Appwrite Node.js server. When a user logs in, I use the
createEmailSession
method provided by Appwrite to authenticate the user and then generate a JWT token using thecreateJWTToken
method. This JWT token is included in the response sent back to the user. Subsequently, when the user makes another API call, I authenticate them on their behalf in the backend and grant access to the resources they request.However, a challenge arises because the JWT token expires quickly, forcing users to frequently log in. Is there a way to extend the expiration time of the JWT token to improve the user experience?
馃帳 Pitch
It would help increase jwt session period without user having to keep login in.
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: