Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garpunkal/punktwofactor
An umbraco nuget package to setup two factor authentication
https://github.com/garpunkal/punktwofactor
Last synced: about 2 months ago
JSON representation
An umbraco nuget package to setup two factor authentication
- Host: GitHub
- URL: https://github.com/garpunkal/punktwofactor
- Owner: garpunkal
- License: mit
- Created: 2022-05-18T09:07:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-14T08:04:47.000Z (over 1 year ago)
- Last Synced: 2024-08-30T23:25:01.106Z (4 months ago)
- Language: C#
- Size: 86.9 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# punkTwoFactor
[![NuGet release](https://img.shields.io/nuget/v/punkTwoFactor.svg)](https://www.nuget.org/packages/punkTwoFactor/)
A simple Umbraco package that uses the documented implementation from Umbraco https://our.umbraco.com/documentation/Reference/Security/two-factor-authentication/#two-factor-authentication-for-users and adds some additional tweaks.
## Nuget
```
Install-Package punkTwoFactor
```https://www.nuget.org/packages/punkTwoFactor/
## Installation
Add the following section to your appsettings.json:
```json
"punkTwoFactor": {
"ProviderName": "Two Factor Authentication",
"Issuer": "Two Factor Authentication - Dev",
"BackOfficeView": "..\\App_Plugins\\punkTwoFactor\\twoFactorProviderGoogleAuthenticator.html"
}
```Add using statement:
```csharp
using punkTwoFactor.Extensions;
```Add the following code block within your **ConfigureServices** section above the Umbraco setup:
```csharp
var twoFactorConfiguration = services.ConfigureTwoFactorConfig(_config);
```Now add the "AddBackOfficeTwoFactorAuthentication" extension to the Umbraco setup.
```csharp
services
.AddUmbraco(_env, _config)
.AddBackOffice()
.AddWebsite()
.AddComposers()
.AddServices()
.AddNotifications()
.AddBackOfficeTwoFactorAuthentication(twoFactorConfiguration)
.Build();
```## Compatibility
- Umbraco 10+