diff --git a/api/oauth/oauth.go b/api/oauth/oauth.go index ed3700b1e..2c78e15a4 100644 --- a/api/oauth/oauth.go +++ b/api/oauth/oauth.go @@ -50,7 +50,7 @@ func (*Service) Authenticate(code string, configuration *portainer.OAuthSettings return "", err } - maps.Copy(idToken, resource) + maps.Copy(resource, idToken) username, err := GetUsername(resource, configuration.UserIdentifier) if err != nil {