email_otp 1.0.1
email_otp: ^1.0.1 copied to clipboard
A fast & simple email authentication OTP sender and verification flutter package.
A fast & simple email authentication OTP sender and verification flutter package. It generates an OTP on the recipient's email which can be used to verify their identity.
Usage
import 'package:email_otp/email_otp.dart';
Methods
⭐ Class Intilization
Email_OTP myauth = Email_OTP();
⭐ setConfig() this function will config your OTP authentication.
myauth.setConfig(
appEmail: "[email protected]",
appName: "Email OTP",
userEmail: email.text,
);
appEmailis your personal or company email, so client we see this mail when they recevie OTP.appNameis your app name, client will recived mail with this name.userEmailproperty where OTP need to sent.
⭐ sendOTP() this function will send OTP, and return boolean
await myauth.sendOTP();
⭐ verifyOTP() this function will verify OTP, and return boolean. this method must have one parameter for OTP, which is enter by client.
var inputOTP = 987654; //which is enterted by client, after recieve mail
await myauth.verifyOTP(
otp: inputOTP
);
See Complete Example
Code : https://pub.dev/packages/email_otp/example