Table of Contents

Class TotpValidator

Namespace
GastroSky.Services.Totp.TotpValidator
Assembly
GastroSky.dll

2FA TOTP validator service. Implements the ITotpValidator interface.

public sealed class TotpValidator : ITotpValidator
Inheritance
TotpValidator
Implements
Inherited Members

Methods

ValidateTotp(string?, string?)

Validates a TOTP against a given TOTP secret string.

public bool ValidateTotp(string? totpSecret, string? totp)

Parameters

totpSecret string

The Base32-encoded TOTP secret.

totp string

TOTP to validate.

Returns

bool

true if the TOTP 2FA validation succeeded, false if the code was not correct.

See Also