CkOtpConfig class

OTP configuration — null means no OTP flow

Constructors

CkOtpConfig({Set<CkOtpTrigger> autoTriggers = const {}, CkOtpVerificationStrategy verificationStrategy = CkOtpVerificationStrategy.tokenBased, Duration resendCooldown = const Duration(seconds: 120), int maxResendAttempts = 0, int otpLength = 6, String verificationTokenHeaderKey = 'token', bool sendVerificationTokenInHeader = true, int? otpNotVerifiedStatusCode = 403, required FutureOr<Map<String, dynamic>> verifyBodyBuilder(VerifyOtpCallBack otpCallBack), required FutureOr<Map<String, dynamic>> resendBodyBuilder(ResendOtpCallBack resendOtpCallBack)})

Properties

autoTriggers Set<CkOtpTrigger>
Which flows auto-trigger OTP after the initial API call
final
hashCode int
The hash code for this object.
no setterinherited
maxResendAttempts int
Max resend attempts per session (0 = unlimited)
final
otpLength int
OTP digit length for UI hints (default: 6)
final
otpNotVerifiedStatusCode int?
HTTP status code returned by the server when OTP is required / not verified (default: 403).
final
resendBodyBuilder FutureOr<Map<String, dynamic>> Function(ResendOtpCallBack resendOtpCallBack)
final
resendCooldown Duration
Resend cooldown duration (default: 120 seconds)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendVerificationTokenInHeader bool
Whether to send verification token in header (true) or body (false)
final
verificationStrategy CkOtpVerificationStrategy
How the backend verifies OTP identity
final
verificationTokenHeaderKey String
Header key for verification token (default: 'token')
final
verifyBodyBuilder FutureOr<Map<String, dynamic>> Function(VerifyOtpCallBack otpCallBack)
Custom body builder for OTP verify request
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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