Interface IEmailVerificationTokenStore

Assembly: redb.Identity.Core.dll

N-4 (Session C, sub-step N4-6): server-side e-mail-verification token store. Mirror of
with one extra binding — the
token is tied to the specific e-mail value snapshot captured at issue time, so a
stale link cannot vouch for an address the user has since changed.

public interface IEmailVerificationTokenStore

Methods

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

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

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.

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