Class RedbEmailVerificationTokenStore

Assembly: redb.Identity.Core.dll

N-4 (Session C, sub-step N4-6): redb-backed
. Direct mirror of
RedbPasswordResetTokenStore with one extra field on the persisted props
() and one extra field on the verify
result so the caller can guard against the double-change race.

public sealed class RedbEmailVerificationTokenStore : IEmailVerificationTokenStore

Inheritance

Object→RedbEmailVerificationTokenStore

Implements

Methods

IssueAsync(long, string, string, TimeSpan, CancellationToken)

Issues a new verification token. Generates a 32-byte CSPRNG secret

public Task<EmailVerificationIssueResult> IssueAsync(long userId, string email, string callerVerifyUrl, TimeSpan ttl, CancellationToken ct = default)

VerifyAndConsumeAsync(Guid, string, CancellationToken)

Verifies and atomically consumes a verification token keyed by jti.

public Task<EmailVerificationVerifyResult> VerifyAndConsumeAsync(Guid jti, string token, CancellationToken ct = default)

Constructors