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
- android platform invaild origina
It happened today suddenly. Our app says invalid origin. And appwrite cloud says every time we tried to add the app to it: "param platformId" is not optional.
- Team invite - 500 error - no email
When executing ```dart await _repository.teams.createMembership( teamId: event.listId, roles: ['member'], email: event.email, url: 'xxxx', ); ``` I se...
- Help with nameservers
I just added our domain, and as per instruction in the page following, it says, "Add the following nameservers on your DNS provider. ..." I want to keep my cu...