Back

session.providerRefreshToken is empty

  • 0
  • Cloud
matteo_spada
14 Apr, 2024, 16:16

Hi! πŸ‘‹

I am authenticating a user using google, during authentication I added "https://www.googleapis.com/auth/spreadsheets" as additional scope , the authentication works correctly and a session is generated but printing the session data like the accessToken and the RefreshAccessToken which is needed for future calls, I realized that the RefreshAccessToken is empty.

Do you know why?

My goal is to save the refreshAccessToken in an encrypted manner to a db so that I can use it in the future to generate a new accessToken.

I add attached images of the function to print the session info and the browser console

TL;DR
Issue: RefreshAccessToken is empty when printing session data after authenticating a user using Google with additional scope. Solution: - Check if your OAuth consent screen setup includes the necessary permissions. - Ensure that you are requesting the "offline" access type during the authentication process. - Confirm that your application is properly handling token refresh flows. Remember: The RefreshAccessToken is essential for generating new access tokens in the future.
matteo_spada
14 Apr, 2024, 16:19
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