Skip to content

Commit 1b355c8

Browse files
committed
Define the explicit scope for the sso-oidc client
As https://docs.aws.amazon.com/sdkref/latest/guide/feature-sso-credentials.html states, the SSO session has to have the `sso:account:access` scope assigned. #2
1 parent a67898a commit 1b355c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws-creds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def cache_file(self) -> Path:
5454

5555
def _new_session_token(identity_center: IdentityCenter) -> str:
5656
sso_oidc = Session().create_client("sso-oidc", region_name=identity_center.ic_region)
57-
client_creds = sso_oidc.register_client(clientName="myapp", clientType="public")
57+
client_creds = sso_oidc.register_client(clientName=_prog, clientType="public", scopes=["sso:account:access"])
5858
device_authorization = sso_oidc.start_device_authorization(
5959
clientId=client_creds["clientId"],
6060
clientSecret=client_creds["clientSecret"],

0 commit comments

Comments
 (0)