1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-20 12:51:17 +00:00

Fix: Even with offline access no refresh token is present

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-05-13 22:43:14 +02:00
parent 9bd8af70e5
commit c511e08ab7
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -162,7 +162,11 @@ func (a *AuthGoogleOAuth) Login(res http.ResponseWriter, r *http.Request) (user
// method. If no login using this method is possible the function
// needs to return nil.
func (a *AuthGoogleOAuth) LoginFields() (fields []plugins.LoginField) {
loginURL := a.getOAuthConfig().AuthCodeURL(a.AuthenticatorID(), oauth2.AccessTypeOffline)
loginURL := a.getOAuthConfig().AuthCodeURL(
a.AuthenticatorID(),
oauth2.AccessTypeOffline,
oauth2.SetAuthURLParam("prompt", "consent"),
)
return []plugins.LoginField{
{