AuthyoService class

Singleton service to interact with Authyo APIs for sending and verifying OTPs.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearToken() → void
Clears the current clientId and clientSecret.
init({String? clientId, String? clientSecret, Duration? connectTimeout, Duration? receiveTimeout, bool? showVerificationDialog}) → void
Initializes the plugin with your clientId and clientSecret.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendOtp({required BuildContext ctx, required String to, bool resendOTP = false, int? expiry, int? otpLength, AuthwayEnum? authWay, void onVerificationComplete(AuthyoResult authyoResult)?}) Future<AuthyoResult>
SEND OTP REQUEST Triggers a sendOtp request to Authyo Servers using your clientId and clientSecret. to param requires a phoneNumber or emailAddress This request optionally accepts expiry (in seconds), otpLength (By Default 6), authWay (sms,whatsapp etc..). Returns an AuthyoResult containing either the an AuthyoResponseModel or an ApiError. authWay an optional argument to specify the platform to send OTP such as SMS, Whatsapp, Voice call. onVerificationComplete callback function to check whether OTP validation is successful or not. It should be ONLY used when plugin's default OTP verification dialog is used.
toString() String
A string representation of this object.
inherited
verifyOtp({required String maskId, required String otp}) Future<AuthyoResult>
VERIFY OTP Triggers a verifyOtp request to Authyo Servers using your clientId and clientSecret. maskId param requires a valid maskId received from sendOtp response, in case of success. otp param requires the OTP you have received via your desired authWay Returns an AuthyoResult containing either the an AuthyoResponseModel or an ApiError.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance AuthyoService
The single instance of AuthyoService.
final