wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.VerificationCodeGen

Synopsis

Documentation

data VerificationCodeGen Source #

A contextual string that is hashed into the key to yield distinct keys in different contexts for the same email address. TODO: newtype KeyContext = KeyContext ByteString

mkVerificationCodeGen :: EmailAddress -> VerificationCodeGen Source #

Initialise a Code VerificationCodeGenerator for a given natural key. This generates a link for emails and a 6-digit code for phone. See also: mk6DigitVerificationCodeGen.

mk6DigitVerificationCodeGen :: EmailAddress -> VerificationCodeGen Source #

Initialise a Code VerificationCodeGenerator for a given natural key. This generates a 6-digit code, matter whether it is sent to a phone or to an email address. See also: mkVerificationCodeGen.

generateVerificationCode Source #

Arguments

:: Member Random r 
=> VerificationCodeGen

The VerificationCodeGenerator to use.

-> Scope

The scope of the generated code.

-> Retries

Maximum verification attempts.

-> Timeout

Time-to-live in seconds.

-> Maybe UUID

Associated account ID.

-> Sem r Code 

VerificationCodeGenerate a new Code.