Fix infinite loop with Okta push
This PR fixes Okta infinite loop with MFA push, raised in issue #714.
I have tested this on my machine, and have been using it for several months now.
Please note that I'm a complete Go newbie, so any suggestions and improvements are welcome.
@wolfeidau Any chance this might make it into a release? The infinite loop in the current release is a blocker for us
@wolfeidau Bump for review, please?
This PR fixes okta+duo login issues for me too.
@resnikb could you merge/rebase this branch with master for CI to get triggered again?
@jck No worries, done
@wolfeidau We've been using this fix at my workplace for a few months and can confirm that it fixes okta infinite loop issues we were experiencing. Any chance you could review?
@wolfeidau @mapkon any chance we could get this merged in?
@wolfeidau @mapkon any chance we could get this merged in?
I indeed can. Any chance you can give me some unit tests?
Codecov Report
Merging #773 (6944b39) into master (4903e2f) will increase coverage by
0.47%. The diff coverage is92.30%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## master #773 +/- ##
==========================================
+ Coverage 31.86% 32.33% +0.47%
==========================================
Files 52 52
Lines 7492 7502 +10
==========================================
+ Hits 2387 2426 +39
+ Misses 4787 4753 -34
- Partials 318 323 +5
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 32.33% <92.30%> (+0.47%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/provider/okta/okta.go | 11.63% <92.30%> (+4.19%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@jck @resnikb
I was going to merge this until I noticed that it would bump the code coverage down. Please consider adding a test.
Thanks
Thanks, @mapkon - I'll try to get something together over the weekend.
@resnikb There are conflicts with master :-( - Let's fix those and roll the tests (as suggested). I want to merge this
@mapkon Thanks - I've added a test for the rememberDevice functionality, but I was unable to create one that works for preserving cookie values. Any suggestions are appreciated
@briantist / @gliptak - thoughts?
consider merging #1004 making this corner testable
after this PR can be rebased and particular signature updated to
func (oc *Client) getStateToken(req *http.Request, loginDetails *creds.LoginDetails) (string, error) {
and test updated to assert cookie persistence
Thanks, @mapkon and @gliptak, I've made the requested changes, please take a look.
@resnikb thank you for the updates :+1: