1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-08 22:46:33 +02:00

Fix default scope settings for none oidc providers like GitHub (#1927)

* fix default scope settings for none oidc providers

* add changelog for bugfix

* fix scope test cases by producing and accessing correct result value
This commit is contained in:
Jan Larwig
2022-12-23 10:00:57 +01:00
committed by GitHub
parent ddcc433a97
commit 8b77c97009
3 changed files with 24 additions and 7 deletions

View File

@ -152,7 +152,7 @@ func newProviderDataFromConfig(providerConfig options.Provider) (*ProviderData,
p.EmailClaim = providerConfig.OIDCConfig.UserIDClaim
}
if p.Scope == "" {
if providerConfig.Type == "oidc" && p.Scope == "" {
p.Scope = "openid email profile"
if len(providerConfig.AllowedGroups) > 0 {