I would like to develop an application to display the contents of Gmail inbox.
However, refresh_token does not exist even after checking onAccessToken.
I would like to set access_type = offline to get refresh_token,
What should I do?
<Oauth
settingsKey="oauth" title="Gmail Login" label="Gmail" status="Login" authorizeUrl="https://accounts.google.com/o/oauth2/v2/auth" requestTokenUrl="https://www.googleapis.com/oauth2/v4/token" clientId="XXXXXXXXXXXXXXXXXX" clientSecret="XXXXXXXXXXXXX" scope="https://www.googleapis.com/auth/gmail.readonly" onAccessToken={async (data) => { console.log(data); }}
/>
You can try adding "offline_access" to the scope.
scope="offline_access, https://www.googleapis.com/auth/gmail.readonly
NOTE:
I am currently experimenting some issues on authentication using iOS (on Android is working fine)
3rd-party-REST-API-OAuth-authentication
Best Answer