Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

fix: ensure that DoStatus is called for u2f devices #135

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/duo.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (d *DuoClient) ChallengeU2f(verificationHost string) (err error) {
// immediately if successful, because it's a single check
// but for Push you get empty value and have to
// wait on second response post-push
if d.Device != "u2f" && d.Device != "token" {
if d.Device != "token" {
// This one should block untile 2fa completed
auth, _, err = d.DoStatus(txid, sid)
if err != nil {
Expand Down Expand Up @@ -349,7 +349,7 @@ func (d *DuoClient) DoU2FPromptFinish(sid string, sessionID string, resp *u2fhos
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
err = fmt.Errorf("Prompt request failed: %d", res.StatusCode)
err = fmt.Errorf("U2F Prompt request failed: %d", res.StatusCode)
return
}

Expand Down