11-22-2017 05:56 - edited 11-22-2017 05:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-22-2017 05:56 - edited 11-22-2017 05:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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); }}
/>
12-04-2017 18:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-04-2017 18:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I would like an answer to this question too. Even with pkce set to true it does not return a refresh token.

12-05-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-05-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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

12-05-2017 01:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-05-2017 01:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
That didn't work for me, it returns with an error "invalid scope"
