
As, some asked this question, How do I generate the token incase 15 minutes elapse or will have to generate a new one?
And Steven answer have to generate new one. So in that case, it's possible if we can have a interceptor at top level and when Appwrite exception occurs that get trigger and and generate new token and then save the local storage and then recall the failed request.
cc
@Steven

Hi, since this seems like a continuation of a past conversation, can you probably back link the messages so I understand more about this and/or you can give me more context?

hi, sure this is what I found when last time some asked related to this around 02/08/2022.... https://discord.com/channels/564160730845151244/564161903685795841/1003982972409622599

@joeyouss so right now, config the project architecture so that once I start working on feature logic I don't have to keep changing the architecture. So it would kind of you if you could help answer this one. Thank you 🙏

Thank you for sharing @Vedsaga let me take a look

If this is regarding the JWT token, why do you want to increase the limit from 15 minutes? 🤔

Is there a possibility you can share more about the use case so maybe we could either help you fix this or come up with a workaround as you suggested

something like this interceptor works in http, (just rough diagram of interceptor-architecture)

ah, no no I don't want to increase the time at all.

just that, I want app write response to be intercepted if response have error due to expire-token
so that I can recall the create-token and then update the local storage and then again recall the failed request
again...

I hope I am making sense here

Yes you are making sense, I understand what you are trying to implement
Recommended threads
- Client Error
Hi Appwrite Community. I've got the Problem, that when I want to define my client, it won't work. Can somebody help me? (Project ID has been removed due to pri...
- create project in organization from api-...
I need to create a project via api-rest, would there be a possible way?
- Is my approach for deleting registered u...
A few weeks ago, I was advised not to use the registered users' id in my web app. Instead, I store the publicly viewable information such as username and email ...
