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
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- How to successfully migrate from 1.9.0 t...
I've tried the automatic tool for migration but my Appwrite (self-hosted) went to a broken state. My functions wouldn't deploy anymore, some things just didn't ...
- How to disable appwrite/embedding from s...
Hi everyone! I'm currently running a self-hosted instance of Appwrite. For my current use case, I don't need the AI/embedding features, and I noticed the `app...