granted
granted copied to clipboard
`granted sso generate` only works when `--sso-region` is specified
Using granted 0.9.0
$ granted sso generate https://mycompany.awsapps.com/start/
[!] Please specify the --sso-region flag: 'granted generate --sso-region us-east-1 https://lightspeedhq.awsapps.com/start/'
[!] Currently, Granted defaults to using us-east-1 if this is not provided. In a future version, this flag will be required (https://github.com/common-fate/granted/issues/360)
[i] If the browser does not open automatically, please open this link: https://device.sso.us-east-1.amazonaws.com/?user_code=PKZJ-PHML
[i] Awaiting AWS authentication in the browser
[i] You will be prompted to authenticate with AWS in the browser, then you will be prompted to 'Allow'
Opens the following URL (after redirects) (replaced some fields with XXX):
https://mycompany.awsapps.com/start/user-consent/authorize.html?
clientId=XXX
&clientType=XXX
&deviceContextId=XXX
®ion=us-west-2
&state=XXX
With content:
Authorize request
An application or device requested authorization using your AWS sign-in.
[Allow]
[Cancel]
Clicking Allow
gives the following error popup:
invalid_grant
Invalid grant provided
The CLI doesn't react.
Issue persists in 0.9.1
Works when I specify --sso-region us-west-2
! I'll retitle the issue