@@ -26,6 +26,7 @@ import (
2626const (
2727 defaultWellKnownConfig = "https://accounts.stackit.cloud/.well-known/openid-configuration"
2828 defaultCLIClientID = "stackit-cli-0000-0000-000000000001"
29+ scope = "openid groups offline_access email"
2930
3031 loginSuccessPath = "/login-successful"
3132
@@ -129,7 +130,7 @@ func authorizeUserWithPKCE(p *print.Printer, idpWellKnownConfig *wellKnownConfig
129130 Endpoint : oauth2.Endpoint {
130131 AuthURL : idpWellKnownConfig .AuthorizationEndpoint ,
131132 },
132- Scopes : []string {"openid offline_access email" },
133+ Scopes : []string {scope },
133134 RedirectURL : redirectURL ,
134135 }
135136
@@ -360,7 +361,7 @@ type deviceAuthorizationResponse struct {
360361func getDeviceAuthorizationData (deviceAuthorizationEndpoint , clientID string ) (* deviceAuthorizationResponse , error ) {
361362 form := url.Values {}
362363 form .Set ("client_id" , clientID )
363- form .Set ("scope" , "openid offline_access email" )
364+ form .Set ("scope" , scope )
364365
365366 req , err := http .NewRequest ("POST" , deviceAuthorizationEndpoint , strings .NewReader (form .Encode ()))
366367 if err != nil {
0 commit comments