I had to refer to the source code to solve a strange login problem I had. It seems the code makes a false assumption.
|
// Check if we get a 401. If we did, MFA is required and the OTP was not provided. |
// Check if we get a 401. If we did, MFA is required and the OTP was not provided.
// Get the OTP and resubmit.
Not necessarily. You also get a 401 if the "username" is incorrect.
I don't have MFA configured on my JumpCloud user.
In my case, I was putting the actual JumpCloud username (aws-sandbox) instead of the email address (aws-sandbox@example.com) which is what the JumpCloud login console page really expects.
I don't see a way to disable the MFA prompt. That may be because I'm new to this tool, but I didn't see it in the README.
Failing that, is there a way to programmatically distinguish 401 for lack of MFA and 401 for incorrect credentials? I'm also new to Jumpcloud so I don't know if that's possible.
I had to refer to the source code to solve a strange login problem I had. It seems the code makes a false assumption.
saml2aws/pkg/provider/jumpcloud/jumpcloud.go
Line 117 in f70fefb
Not necessarily. You also get a 401 if the "username" is incorrect.
I don't have MFA configured on my JumpCloud user.
In my case, I was putting the actual JumpCloud username (aws-sandbox) instead of the email address (aws-sandbox@example.com) which is what the JumpCloud login console page really expects.
I don't see a way to disable the MFA prompt. That may be because I'm new to this tool, but I didn't see it in the README.
Failing that, is there a way to programmatically distinguish 401 for lack of MFA and 401 for incorrect credentials? I'm also new to Jumpcloud so I don't know if that's possible.