mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-12-20 12:51:17 +00:00
Fix: Google not returning refresh tokens
which then causes logins with duration of more than 60m to time out and not be able to refresh as of the missing refresh token. The "offline" access type should ensure the token always contains a refresh token and the user can be active for longer than 60m. Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
bc006367fe
commit
93d242c404
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ 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())
|
||||
loginURL := a.getOAuthConfig().AuthCodeURL(a.AuthenticatorID(), oauth2.AccessTypeOffline)
|
||||
|
||||
return []plugins.LoginField{
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue