i have made an api_function where i am sending otp to the user and now i want to check if the entered otp and the generated otp is correct so how do i get the otp generated from the backend appwrite . here's my otp sending function - ``` @override FutureEither<Execution> otp({required String data}) async { try{ final functionss = await _function.createExecution( functionId: 'UserAuth', data: data, ); verifyOTP(enteredOTP: functionss.response); print(functionss.response);
return right(functionss);
} catch (e, stackTrace) {
return left(
Failure(e.toString(), stackTrace)
);
}
}```
How did you generate the OTP?
from backend - python
Okay.... Sorry I'm a little lost
What exactly are you stuck with?
so here in the otp function , (functionss.response) is the generated otp and now i want to check if the otp the user entered and this generated otp is equal or not so to do that either i need to take this functionss.response out of this api fucntion(otp) which i dont know how to or i can make another verifyotp api function but how to retrieve (functionss.response) out of otp function
In general, it doesn't make sense to return the otp to the channel the client sent the request from π§
so how could i verify
Perhaps you should do some research on how the otp flow should work first before trying to do it in Appwrite
Recommended threads
- Current User is Not authorized
recreating same Thread
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...