Closed HalfdanJ closed 2 years ago
Turned out the normal step of revoking access to my app didn't prompt new refresh tokens. I had to add following configuration:
new GoogleOAuth2Provider({
clientId: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_ID,
clientSecret: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_SECRET,
authorizationParams: {
prompt: 'consent',
access_type: 'offline',
response_type: 'code',
},
[...]
}
I'm trying to understand how to use the library with short lived access tokens (the google provider). How can I access the refresh_token, and thereby obtain new access_tokens? I need the access token to call googleapi calls, but after an hour it expires, and I need to login again to obtain new tokens.