-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR - Token must be six digits #36
Comments
Actually, the issue is that DurationSeconds in STS must be greater or equal than 900:
Source: https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html Rerunning this command with 900 should work. aws-mfa should surface this error properly. |
closes broamski#36 When using a session duration of less than 900 seconds aws-mfa prints a misleading error message "Token must be six digits". This PR prints the actual error. In the case of an invalid duration it will print the following: ``` INFO - Fetching Credentials - Profile: <profile>, Duration: 800 ERROR - Invalid parameter: Parameter validation failed: Invalid range for parameter DurationSeconds, value: 800, valid range: 900-inf ```
I'm getting the same error with a greater duration:
My
|
@npearson72 Did you find a solution for this? |
I am receiving the error message:
ERROR - Token must be six digits
when using the command:
Since clearly my MFA token is 6 digits, and since this had worked for me before, I got suspicious and started to change the duration value:
So it appears the duration value being less than 4 digits is causing this error. I'll try to look at the code and submit a PR with a fix.
The text was updated successfully, but these errors were encountered: