Custom Forgot Password Flow using Okta.sdk in c#

Hi there,

I want to implement a custom forgot password flow using my own screens for an app. I am using okta.sdk package in c# for that. I have researched on the flow for forgot password from below links :-

  1. Authentication | Okta Developer
  2. Authentication | Okta Developer
  3. Authentication | Okta Developer
  4. Authentication | Okta Developer

^ these links described the flow very well but I want to implement it using okta sdk package. Though I have found one method that generates the OTT which is :-

^This gives me a link which redirects me to the specific window for further verification step. But, I want to use that link or OTT to perform the second step which is verify OTT through okta sdk. Currently, I am not able to find such method in the library so could you suggest or provide more information about How I can proceed with it?

Thanks in advance…!!

Please check if the below apis of Okta dotnet sdk can help you.

  1. Generates a one-time token (OTT) that can be used to reset a user’s password
    Interface IUsersClient | Okta .NET SDK API Documentation

  2. Sets a new password for a user by validating the user’s answer to their current recovery question
    Interface IUsersClient | Okta .NET SDK API Documentation

Thanks for the reply :slight_smile:

I have checked those methods that you shared. But, I want to implement the flow like below :-

  1. Get OTT token (one time token)
  2. Verify OTT token and it will gives you state token
  3. By using state token, answer the recovery question. It will generate a new state token (probably we
    may want to skip this step)
  4. Use state token from step #3 and do password reset.

Is this possible using okta sdk or do we have another library for it?

@jatinderp.enest You can refer Okta .net sdk GitHub - okta/okta-auth-dotnet: Okta .NET Authentication SDK. It contains functions of forgot password and reset password.
Also this discussion could be helpful to you when implement the flow with sddk.

1 Like

Thanks a lot, this would help :slight_smile: