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
- Appwriter Linux Key Bindings
Any tips for configuring appwriter for ubuntu? Actually the keybindings are tightly binded to either windows or mac. Working well on windows but in ubuntu some ...
- Admin Impersonating Clients?
I have a client that needs to use the admin User, to impersonate the Clients in order to debug better the App and the services that they are providing, could yo...
- create project api-rest
Hello good afternoon, I'm developing a project where I need to create a project by apirest, but I'm stuck with this "projects.read" permission, can I change my ...