You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When logging in using username & password through the idx client twice in succession, the first attempt succeeds but the second attempt fails with a null ref error.
On the second attempt, the error comes from IdxClient.cs AuthenticateWithPasswordAsync when attempting to access a null remediation object within the IdxResponse (result of IntrospectAsync(...)).
Potentially resolving the issue by reinstantiating the client for each request, aka transient scope through DI. The sample project appears to setup the IdxClient similarly using the TransientLifetimeManager.
The Classic Engine Authentication SDK seems to be working as a singleton.
Might be worth updating the readme if this is expected use/behavior for the new Idx sdk.
Describe the bug?
When logging in using username & password through the idx client twice in succession, the first attempt succeeds but the second attempt fails with a null ref error.
On the second attempt, the error comes from IdxClient.cs AuthenticateWithPasswordAsync when attempting to access a null remediation object within the IdxResponse (result of IntrospectAsync(...)).
https://github.com/okta/okta-idx-dotnet/blob/Okta.Idx.Sdk%40v2.2.7/src/Okta.Idx.Sdk/IdxClient.cs#L584
Our client is setup like so:
And the client's AuthenticateAsync method is called with this snippet:
What is expected to happen?
Auth works every time.
What is the actual behavior?
"Object reference not set to an instance of an object." error is returned from the AuthenticateWithPasswordAsync method.
Reproduction Steps?
Call login endpoint which uses the idx client (SUCCESS), call endpoint again (FAILURE).
Additional Information?
No response
.NET Version
7.0.102
SDK Version
2.2.7
OS version
Happens using macOS and Windows dev environments.
The text was updated successfully, but these errors were encountered: