Authjs recovery flow


#1

One of the customer is using auth.js to build their external user authentication flows. They want to do the recovery flow using forgot password question and answer

They found verify answer with statetoken API v1/authn/recovery/answer . But they found it is not available in auth.js. Can you confirm the actual flow to do this in auth.js. Attached the flow we are trying to do. The example states serverside forgot password flow. But we want to achieve the same using auth.js


#2

Never mind i figured it out.

transaction.answer is actually a function and is doing a post with ‘v1/authn/recovery/answer’ which is kind of cool.
So, when I get back the transaction response from authClient.verifyRecoveryToken call, I am saving the transaction and then i can do below.

this.transaction.answer({
answer: ‘My Answer’
})

which is doing a post and returning a success/failure response.


#3

Thanks for this workflow @Krish. Answered my question before I could ask it.

–Ray