Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NickyBall/GoogleAuthenticatorService.Core

Open more actions menu

Repository files navigation

GoogleAuthenticatorService.Core

Description

This library was rebuilt of https://github.com/BrandonPotter/GoogleAuthenticator, which is built for .NET Framework. This library is meant to setup and use two-factor authentication with Google Authenticator for .NET Core 2.0

Installation

Via Nuget

Install-Package GoogleAuthenticatorService.Core

Getting started

  1. Generate Setup Code.
TwoFactorAuthenticator Authenticator = new TwoFactorAuthenticator();
var SetupResult = Authenticator.GenerateSetupCode("<Title>", "<Secret Key>", 250, 250);
string QrCodeUrl = SetupResult.QrCodeSetupImageUrl,
string ManualCode = SetupResult.ManualEntryKey
  1. You'll get something like this. Imgur

  2. Setup Code to your Google Authenticator App.

  3. When using, you can verify code like this.

TwoFactorAuthenticator Authenticator = new TwoFactorAuthenticator();
bool ValidateResult = Authenticator.ValidateTwoFactorPIN("<Secret Key>", "123456");

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.