InMemoryAuthEmailChangeTokenStore class final

Bounded in-memory email-change token store for tests and local development.

Token digests and the normalized user, email, and expiry metadata are retained; the raw token is not. Production stores must provide the same atomic consume and expiry guarantees.

Implemented types

Constructors

InMemoryAuthEmailChangeTokenStore({DateTime clock()?, int maxTokens = 1024})
Creates a bounded store using clock for expiry checks.

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxTokens → int
Maximum number of token digests retained by this store.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

captureDeletionState() → Object
Captures the records for rollback by a deletion transaction.
override
consume(String token) → Future<AuthEmailChangeToken?>
Consumes a matching unexpired token at most once.
override
deleteForUser(String userId) → Future<void>
Deletes all stored email-change records for userId.
override
deleteTokenForUser(String userId, String token) → Future<bool>
Deletes one matching record for userId and token.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreDeletionState(Object state) → void
Restores a snapshot produced by captureDeletionState.
override
save(AuthEmailChangeToken token) → Future<void>
Saves token after normalizing its user and email values.
override
toString() → String
A string representation of this object.
inherited

Operators

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