Brook.Totp 1.0.3

Install-Package Brook.Totp -Version 1.0.3
dotnet add package Brook.Totp --version 1.0.3
<PackageReference Include="Brook.Totp" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Brook.Totp --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Brook.Totp, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Brook.Totp as a Cake Addin
#addin nuget:?package=Brook.Totp&version=1.0.3

// Install Brook.Totp as a Cake Tool
#tool nuget:?package=Brook.Totp&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
services.AddBrookTotp();
private readonly ITotp _totp;
public AccountController(ITotp totp)
{
        _totp = totp;
}

[Authorize]
public IActionResult GetQr()
{
    var totpSetup = _totp.GenerateUrl("dotNETBuild", CurremtUser.Email, CurremtUser.SecretKeyFor2FA);

    return Json(new { qrCodeContennt = totpSetup.QrCodeImageContent });
}


[Authorize]
[HttpPost]
public async Task<IActionResult> Valid(int code)
{
    var valid = _totp.Validate(CurremtUser.SecretKeyFor2FA
        , code, 30);
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 1,017 8/17/2019
1.0.2 249 8/16/2019