Is there a way I can create a long running JWT session.
I want to create a native session in my mobile app I am using function for that and sending a JWT back for login I want that JWT to work for a long time in the app is there any way to make this long running JWT session.
Summary
To create a long-running JWT session in your mobile app using Appwrite, you can follow these steps:
1. Instead of relying on Appwrite's JWT for session management, use the Appwrite cookie or fallback header.
2. The cookie or fallback header can be obtained by making a request to `<https://appwrite.io/docs/apis/rest#client-integration>`.
3. Look for the `X-Fallback-Cookies` section on that page for more information.
4. When the JWT expires, instead of trying to extend its duration, create a new JWT.
5. Currently, it is not possible to specify the duration of the
Ajit Singh
Rank 3: Container
Oct 27, 2023, 09:22
Way to create long running JWT sessions
D5
Moderator
Oct 27, 2023, 14:12
For now it's not possible to specify JWT duration
D5
Moderator
Oct 27, 2023, 14:12
Instead you should create a new JWT
D5
Moderator
Oct 27, 2023, 14:12
When it expires
Drake
Admin
Oct 27, 2023, 18:52
I would suggest using the Appwrite cookie or fallback header instead of Appwrite's JWT