Hi everyone,
I’ve been working on getting Auth0+Google APIs to work for me. I managed to get it working with regular access tokens with the following flow:
-
Retrieve the Auth0 Management API Access Token from https://MYDOMAIN.auth0.com/oauth/token with my client ID+Secret
-
Using the Mgmt API Token, retrieve the users access token from https://MYDOMAIN.auth0.com/api/v2/users/google-oauth2|USERID
-
Using Googles API (OAuth2Client) and the new access token achieved, I can invoke APIs.
So far so good.
Now, I want to get a Refresh Token so I can keep using the APIs even after the user is disconnected from the system.
I found this article:
But it only talks about getting refresh tokens when working with Authorization Codes, which is not my case.
I configured my API to allow refresh tokens, added access_type: “offline” to my auth params, and added “offline_access” to my scopes. But still, no refresh token is returned in the “identities” field when invoking /api/v2/users
.
Does anyone have any idea how I can get refresh tokens in this setup?
Thanks in advance!
-
Which SDK this is regarding: auth0-node+nextJS
-
SDK Version: nextjs-auth0==1.6.1
-
Platform Version: e.g. Node 17.4.0