mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(oauth): if username is empty, fail to login (#4232)
* fix(oauth): if username is empty, fail to login * fix(oauth): return err when failing to find username * fix(oauth): disable autofill
This commit is contained in:
parent
b3b706d88d
commit
35fa9d6981
3 changed files with 9 additions and 3 deletions
|
@ -88,6 +88,13 @@ func getUsername(token string, configuration *portainer.OAuthSettings) (string,
|
|||
}
|
||||
|
||||
username := values.Get(configuration.UserIdentifier)
|
||||
if username == "" {
|
||||
return username, &oauth2.RetrieveError{
|
||||
Response: resp,
|
||||
Body: body,
|
||||
}
|
||||
}
|
||||
|
||||
return username, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue