Back

Google oauth2 updateSession error: invalid_request: Missing required parameter: refresh_token

  • 0
  • Self Hosted
  • Accounts
  • Web
WildAnimal
31 Jan, 2024, 04:02

After back to my callback page from self hosted oauth2 redirect url for google provider, the callback page call the account.updateSession("current") method to get the new session. I got this error:

TypeScript
{
    "message": "invalid_request: Missing required parameter: refresh_token",
    "code": 400,
    "type": "user_oauth2_bad_request",
    "version": "1.4.13"
}
TL;DR
Developers are encountering an error when calling the account.updateSession("current") method after being redirected from a self-hosted OAuth2 redirect URL for the Google provider. The error message states "invalid_request: Missing required parameter: refresh_token" with a code of 400. Solution: The refresh_token parameter is missing in the request. Make sure to include it when calling the account.updateSession() method. This will resolve the error.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more