In the Appwrite docs it says: (https://appwrite.io/docs/products/auth/oauth2)
OAuth 2 sessions expire to protect from security risks. OAuth 2 sessions should be refreshed periodically, so access tokens don't expire. **Check value of providerAccessTokenExpiry to know if the token is expired or is about to expire. Refreshing before every request might cause rate limit problems. You can do this by calling the Update OAuth Session endpoint when ever your user visits your app.
**
I'm using Nextjs btw.
const promise = account.updateSession('[SESSION_ID]');
Where should I call updateSession
?
Can you please explain how to do it, is there any code example ? Thank you :appwriteheart:
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...