in pkce/pkce.go [34:56]
func New(clientID, redirectURI, domain string, scopes ...string) *Provider {
p := &Provider{
Config: &oauth2.Config{
ClientID: clientID,
RedirectURL: redirectURI,
Endpoint: oauth2.Endpoint{
AuthURL: protocol + domain + authPath,
TokenURL: protocol + domain + tokenPath,
},
},
ProfileURL: protocol + domain + profilePath,
name: "pkce",
}
if len(scopes) > 0 {
p.Config.Scopes = make([]string, len(scopes))
for i, scope := range scopes {
p.Config.Scopes[i] = scope
}
} else {
p.Config.Scopes = []string{"openid", "profile", "email"}
}
return p
}