check for ACTIVE session id when doing passwordless authentication - #524
Conversation
|
PR #525 created to format .cs files. |
Unrelated so I wonder how that got in there in the first place |
| if( oktaSession.Status != "ACTIVE" ) { | ||
| messageWriter.WriteWarning( """ | ||
| Okta passwordless authentication failed. | ||
| An active session ID was not returned from Okta. | ||
| """ ); |
There was a problem hiding this comment.
confirming - is this behaviour consistent with when passwordless auth fails for other reasons (e.g. browser asking for password)? like we're printing the same style of warning messages?
I also wonder if "An active session ID was not returned from Okta" is too detailed and unhelpful. Maybe we can reuse a generic failure message for passwordless auth failures (mostly due to users' network environment)
There was a problem hiding this comment.
There is this one but the rest are kind of generic and don't give a specific reason and I can see why this wouldn't be super helpful for the user - especially since it doesn't tell them it's probably related to just closing zscaler but that seems weird to add in since it's specific to us.
I don't think we have a generic output message but I could just reword it to Okta did not provide expected response
There was a problem hiding this comment.
I'm more thinking of these:
bmx/src/D2L.Bmx/OktaAuthenticator.cs
Lines 220 to 224 in 1d9d72a
There was a problem hiding this comment.
I think "Okta passwordless authentication failed" is appropriate here.
also they're behind the debug flag, so this should be the same.
There was a problem hiding this comment.
There's no real difference between this inactive session failure and the "browser asking for password" failure, so they should behave the same
There was a problem hiding this comment.
Ohh okay I can go with that then
probably .NET SDK updates |
|
PR #526 created to format .cs files. |
|
PR #528 created to format .cs files. |
|
can you merge in the format change too |
|
also need to merge in main to make vulcan-approval work |
Auto format check_for_active_session_id_when_passwordless Co-authored-by: DotNet Format Bot <dotnet-format-bot@github.d2l>
|
Sorry, @cfbao , merging in the autoformat dismissed your review if you don't mind approving again thanks |
|
Did you observe the session status value with experiments @gord5500 ? I wonder what the purpose of a non active session even is, their docs on this part of the API is non-existent AFAICS |
@boarnoah I looked at the docs Chenfeng listed in the ticket https://developer.okta.com/docs/api/openapi/okta-management/management/tags/session/other/getsession An interesting thing I found and makes sense, is when you use bmx login with zscaler off and it caches the bad session id, if you then turn zscaler back on and run bmx print, the cached session will be usable once you turn zscaler back off |
Why
Turning off zscaler gives a bit of time where DSSO will return a session id but not one with status
ACTIVEand so it is uselessTicket
HOD-4575 - BMX > fix passwordless auth