Skip to content

Commit

Permalink
Adds support for Okta Verify risky login challenge
Browse files Browse the repository at this point in the history
Should fix Versent#643
  • Loading branch information
duanewaddleAFS committed May 28, 2022
1 parent df3f6cf commit 42abee5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/provider/okta/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,12 @@ func verifyMfa(oc *Client, oktaOrgHost string, loginDetails *creds.LoginDetails,
switch gjson.Get(body, "factorResult").String() {

case "WAITING":
correctAnswer := gjson.Get(body, "_embedded.factor._embedded.challenge.correctAnswer")
displayedAnswer := false
if !displayedAnswer && correctAnswer.Exists() {
log.Printf("Number Challenge Value is %d", correctAnswer.Int())
displayedAnswer = true
}
time.Sleep(3 * time.Second)
logger.Debug("Waiting for user to authorize login")
updatedContext, err := getMfaChallengeContext(oc, mfaOption, resp)
Expand Down

0 comments on commit 42abee5

Please sign in to comment.