Open EtiennePASSOT opened 2 years ago
I need to make authentification with google oauth2. I've installed nuxt/auth-next and created configuration for authentification like this.
auth: { strategies: { google: { scope: ['profile', 'email'], endpoints: { userInfo: `${process.env.API_URL}/user` }, codeChallengeMethod: '', token: { property: 'id_token' }, refreshToken: { property: 'refresh_token' }, prompt: 'consent', access_type: 'offline', responseType: 'id_token token', clientId: process.env.GOOGLE_CLIENT_ID } } }
The login part work, but the refresh_token is never added in local storage (auth._refresh_token.google = false).
I found only one thing. The refresh token is given only at the first authorization ... but not for me. (Not receiving Google OAuth refresh token) I have used https://myaccount.google.com/permissions to revert permission for my application.
Anyone faced the same problem ? Solution ?
Maybe the property of refresh_token is not good, but I didn't find any doc about it.
Thanks for your help
Same here! The loginWith('google') function will set the auth._token.local = false and clear the refresh_token.
loginWith('google')
auth._token.local = false
refresh_token
I need to make authentification with google oauth2. I've installed nuxt/auth-next and created configuration for authentification like this.
The login part work, but the refresh_token is never added in local storage (auth._refresh_token.google = false).
I found only one thing. The refresh token is given only at the first authorization ... but not for me. (Not receiving Google OAuth refresh token) I have used https://myaccount.google.com/permissions to revert permission for my application.
Anyone faced the same problem ? Solution ?
Maybe the property of refresh_token is not good, but I didn't find any doc about it.
Thanks for your help