This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
VerifyForUser function returns success JSON response in error #11
Labels
bug
Something isn't working
Bug report
Describe the bug
I'm using the
VerifyForUser
function (here) to verify an OTP during my password reset process.I note that I am getting a response of
nill, error
and the error is essentially a JSON string of the200
success result. On line 142 it is checking to ensure the response from the server ishttp.StatusSeeOther
and if it is not, it places the response in the body of the error, even though it is a200 OK
in this case.To Reproduce
Here is a snippet of the code I used that results in this behaviour:
Expected behavior
I would have expected a 200 response to be returned as the first param, not in the error.
System information
Snippets from my go.mod file:
Additional context
This could be because I have the incorrect process or that I am using the incorrect function. I noted that there is a
Verify
function above that usesGET
rather thanPOST
. I may look at that at some point, but my current method is actually working right now.The text was updated successfully, but these errors were encountered: