Interface IEmailTotpService
- Namespace
- GastroSky.Services.Totp.EmailTotpService
- Assembly
- GastroSky.dll
TOTP service for ensuring people don't accidentally input the wrong email address when buying from our store.
public interface IEmailTotpService
Methods
GenerateAndSendTotp(string, Language)
Generates a TFA token for a given email address and sends it to it. It will be valid for 20 minutes.
Task<bool> GenerateAndSendTotp(string email, Language language)
Parameters
emailstringThe email address for which to generate the TOTP.
languageLanguageThe Language to use in the email that is sent out.
Returns
GenerateTotp(string)
Generates a TFA token for a given email address without sending it or anything. Raw and dirty. Valid for 20 minutes.
Task<string> GenerateTotp(string email)
Parameters
emailstringThe email address for which to generate the TOTP.
Returns
ValidateTotp(string, string)
Validates a TOTP for a given email address that was generated using GenerateAndSendTotp(string, Language).
Task<bool> ValidateTotp(string email, string totp)