@@ -97,6 +97,8 @@ and success, unless if the --no-shutdown flag is provided.`,
9797 prompt := flagx .MustGetStringSlice (cmd , "prompt" )
9898 maxAge := flagx .MustGetInt (cmd , "max-age" )
9999 redirectUrl := flagx .MustGetString (cmd , "redirect" )
100+ authUrl := flagx .MustGetString (cmd , "auth-url" )
101+ tokenUrl := flagx .MustGetString (cmd , "token-url" )
100102 audience := flagx .MustGetStringSlice (cmd , "audience" )
101103 noShutdown := flagx .MustGetBool (cmd , "no-shutdown" )
102104
@@ -118,15 +120,20 @@ and success, unless if the --no-shutdown flag is provided.`,
118120 redirectUrl = serverLocation + "callback"
119121 }
120122
121- if err != nil {
122- return err
123+ if authUrl == "" {
124+ authUrl = urlx . AppendPaths ( endpoint , "/oauth2/auth" ). String ()
123125 }
126+
127+ if tokenUrl == "" {
128+ tokenUrl = urlx .AppendPaths (endpoint , "/oauth2/token" ).String ()
129+ }
130+
124131 conf := oauth2.Config {
125132 ClientID : clientID ,
126133 ClientSecret : clientSecret ,
127134 Endpoint : oauth2.Endpoint {
128- TokenURL : urlx . AppendPaths ( endpoint , "/oauth2/token" ). String () ,
129- AuthURL : urlx . AppendPaths ( endpoint , "/oauth2/auth" ). String () ,
135+ AuthURL : authUrl ,
136+ TokenURL : tokenUrl ,
130137 },
131138 RedirectURL : redirectUrl ,
132139 Scopes : scopes ,
0 commit comments