DVAuthTokens class

Issues and redeems magic links and one-time passcodes.

Constructors

DVAuthTokens({DVAuthTokenStore? store, Duration lifetime = const Duration(minutes: 15), int maxAttempts = 5, Random? random})

Properties

hashCode int
The hash code for this object.
no setterinherited
lifetime Duration
How long an issued secret stays redeemable.
final
maxAttempts int
Wrong attempts allowed before an identifier is throttled.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
store DVAuthTokenStore
final

Methods

Issues a magic link for identifier.
issueOtp(String identifier, {int digits = 6}) Future<String>
Issues a numeric passcode for identifier, returning the code to send.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Redeems a magic-link token. Single use: a redeemed link cannot be replayed, which matters because links sit in mailboxes indefinitely.
redeemOtp(String identifier, String code) Future<DVAuthTokenResult>
Redeems a passcode for identifier.
toString() String
A string representation of this object.
inherited

Operators

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