SeliseBlocks.MfaDriver
8.0.0-preview.8
See the version list below for details.
dotnet add package SeliseBlocks.MfaDriver --version 8.0.0-preview.8
NuGet\Install-Package SeliseBlocks.MfaDriver -Version 8.0.0-preview.8
<PackageReference Include="SeliseBlocks.MfaDriver" Version="8.0.0-preview.8" />
<PackageVersion Include="SeliseBlocks.MfaDriver" Version="8.0.0-preview.8" />
<PackageReference Include="SeliseBlocks.MfaDriver" />
paket add SeliseBlocks.MfaDriver --version 8.0.0-preview.8
#r "nuget: SeliseBlocks.MfaDriver, 8.0.0-preview.8"
#addin nuget:?package=SeliseBlocks.MfaDriver&version=8.0.0-preview.8&prerelease
#tool nuget:?package=SeliseBlocks.MfaDriver&version=8.0.0-preview.8&prerelease
SeliseBlocks.MfaDriver
Overview
SeliseBlocks.MfaDriver
is a MFA driver designed to integrate MFA functionalities into your application. It provides a standardized way to generate, verify and manage MFA.
Installation
To install SeliseBlocks.MfaDriver
, add the NuGet package to your project:
dotnet add package SeliseBlocks.MfaDriver
Usage
Register Dependencies
Before using SeliseBlocks.MfaDriver
, ensure that all required dependencies are registered in your application's dependency injection container. Add the following line in your Program.cs
:
use the namespace
using Blocks.Extension.DependencyInjection;
register the service
builder.Services.RegisterBlocksMfaService();
This method will configure and register all necessary services required for the MFA driver to function properly.
Features
Generate OTP
var request = new OtpGenerationRequest { UserId = <string>, ProjectKey = <string> }
Invoke
GenerateOtpAsync
await GenerateOtpAsync(request);
Verify OTP
var request = new VerifyOtpAsync { VerificationCode = <string>, TwoFactorId = <string>, AuthType = <Enum>, //None,TOTP,Email ProjectKey = <string> }
Invoke
VerifyOtpAsync
await VerifyOtpAsync(request);
Manage User MFA
var userMfa = new UserMfaConfiguration { UserId = <string>, MfaEnabled = <string>, AuthType = <Enum>, //None,TOTP,Email ProjectKey = <string> }
Invoke
ManageUserMfaAsync
await ManageUserMfaAsync(request);
use the below namespace before invoking any of the methods.
using Blocks.MfaDriver;
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Otp.NET (>= 1.4.0)
- SeliseBlocks.MailDriver (>= 8.0.0-preview.8)
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 |
---|---|---|
8.0.0-preview.9 | 42 | 4/7/2025 |
8.0.0-preview.8 | 432 | 3/25/2025 |
8.0.0-preview.7 | 438 | 3/25/2025 |
8.0.0-preview.6 | 108 | 3/18/2025 |
8.0.0-preview.5 | 107 | 3/17/2025 |
8.0.0-preview.4 | 110 | 3/17/2025 |
8.0.0-preview.3 | 124 | 3/10/2025 |
8.0.0-preview.2 | 55 | 2/27/2025 |