
MaximilianoC.87114 (Customer) asked a question.

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All
May Okta Community Buzz
Stay ahead of the curve with Okta for AI Agents, new Okta Learning live sessions and labs, shout-outs, and top trending topics—all aimed at enriching your Okta journey.
Dear Maximiliano,
How did you end up implementing this?
I want to do same thing but the documentation above is confusing. Ideal way would have been ready recipies which a user can read through and follow based on most commonly used use cases.
I read through the documenttaion...can we follow the below process
call lifecycle/reset_password API with sendemail=false
Strip the OTT from the above call and send to user in email as link to custom page
on custom page user enters the new password
get the stateToken against the OTT
use Credentials/reset_password to set the new password.
Hi,
We are also implementing custom activation and forgot password flow. For the forgot password flow, which API should I call to check the one time code is valid or expired?
Let me explain in details:
For the activation flow, we are calling the "/lifecycle/activate?sendEmail=false" API and it will generate activationToken and activationLink. Then we call "/api/v1/authn" to validate activationToken. Similarly, we need to support the forgot password flow. I call the "/credentials/forgot_password?sendEmail=false" and it will generate resetPasswordUrl. If I extract the one time code from that URL, which API I can call to validate that the token? Since it is a custom UI, we can't directly click the link for the resetPasswordUrl. If the link get expires after 24hr, we need to convey this message to the user but I am not sure how to accomplish that.
Also, how to setup the config in Okta so that the forgotPasswordLink expires in 24hr or so? (I could setup for the activationLink but not for the forgotPasswordLink )
https://developer.okta.com/docs/reference/api/users/#reset-password
Tricky part here
Docs:
This operation will transition the user to the status of RECOVERY and the user will not be able to login or initiate a forgot password flow until they complete the reset flow.
So in other words - I can request forget password for another person, and this person will be blocked!
@nmz8a (nmz8a) I think you could get around this by re-generating a recovery token for the user. In other words, if the user does not set their password. When they go to request a new set password link, their recovery token should be re-generated.
We also use https://developer.okta.com/docs/reference/api/users/#update-user to update the credentials of the user, since we don't know what the previous pwd is, but we can validate the token with https://developer.okta.com/docs/api/resources/authn#verify-recovery-factor