I have user logged in by google by regular app with implicit flow.
I created m2m application and obtained management token.
Now I send request about user
https://preciselab.eu.auth0.com/api/v2/users/google-oauth2%7C111933984350447610620
and have only access_token, no refresh_token from google
{
"provider": "google-oauth2",
"access_token": "ya29.a0ARrdaM9DcSJBngl_ebFljROJGr3d1Ys2ooe6",
"expires_in": 3599,
"user_id": "111933984350447610620",
"connection": "google-oauth2",
"isSocial": true
}
I need refresh token , because of after expiration time access_token do not works in emails synchronization by gmail, but with refresh token I should be able to sync email longer time than one hour.
Hi @PreciseLab ,
Welcome to the Auth0 Community!
I understand you would like to retrieve a refresh token for Google’s APIs.
It looks like this is covered here:
Please ignore my previous answer, as it only applies when you want to login with Google, but in your case you need to also call the Google APIs (such as calendar). Then of course, you’d need to deal with the Google tokens directly. So, sorry about the confusion here.
So according to the docs, for Google, you would need to add access_type: offline to the /authorize request:
Call an Identity Provider API :
For certain Identity Providers, Auth0 will store a Refresh Token which you can use to ob…
Please let me know if you have any other questions.
system
Closed
November 30, 2021, 10:42pm
3
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.