Add a configurable option to set the duo mfa option - #259
Conversation
pwmcintyre
left a comment
There was a problem hiding this comment.
Very happy that this is a feature don't is working on, but I do have concerns and some feedback, please continue!
| Password string | ||
| MFAToken string | ||
| DuoMFAOption string | ||
| URL string |
There was a problem hiding this comment.
I like to think this could be just MFAOption, leaving it open to be implemented on other providers?
| duoMfaOption := prompter.Choose("Select a DUO MFA Option", duoMfaOptions) | ||
| duoMfaOption := 0 | ||
|
|
||
| if loginDetails.DuoMFAOption == "Duo Push" { |
There was a problem hiding this comment.
I'm not sure this is safe, I don't think there's any certainty of the order - you may need to iterate over each and compare
There was a problem hiding this comment.
I assumed it was OK, since the code previously assumed an order (and since the array is declared just above)
I could iterate to be make it safer however.
wolfeidau
left a comment
There was a problem hiding this comment.
I am OK with the solution in the current state.
Really need to refactor that entire provider.
This change adds a configurable option so that users can set a flag to configure their prefered duo option (Push or Passcode). This is useful for users, who setup aliases, and want a swift and easy approach to login into the accounts.