Skip to content

Commit

Permalink
Fix: Even with offline access no refresh token is present
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <knut@ahlers.me>
  • Loading branch information
Luzifer committed May 13, 2019
1 parent 9bd8af7 commit c511e08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/auth/google/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
{
Expand Down

0 comments on commit c511e08

Please sign in to comment.