appwrite: 🐛 Bug Report: Google Access Token disappears after calling "updateSession"
👟 Reproduction steps
- Log in successfully using Google OAuth (
account.createOAuth2Session('google', xxx, xxx, [scope])) - Call
account.getSession('current')providerAccessTokenis populated and can be used to call Google APIsproviderRefreshTokenis empty, but this is expected as we do not want this to be visible to the client
- Call
account.updateSession('current') - Call
account.getSession('current')providerAccessTokenis emptyproviderRefreshTokenis empty
👍 Expected behavior
Calling account.updateSession('current') is explained in the docs (https://appwrite.io/docs/client/account?sdk=web-default#accountUpdateSession) as a method to refresh access tokens. I assume this is supposed to use a refreshToken to achieve this serverside, which is the recommended safe way of doing this.
👎 Actual Behavior
Refreshing the access token does not work, and instead leaves the current session empty.
Looking at the clues, are we missing the refreshToken?
🎲 Appwrite version
Version 1.3.x
💻 Operating system
Linux
🧱 Your Environment
Self-hosted 1.3.X on an AWS EC2 instance.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn’t find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 8
- Comments: 20 (8 by maintainers)
@Shaik-Sirajuddin I’ve seen you have made a PR. Do you can provide screenshots/video or similar of the fix working? That way it will be easier to review it and the process will be faster.