From 9b894ec69f4903ef95c01346fbb0ce886cb7f011 Mon Sep 17 00:00:00 2001 From: Frans Lytzen Date: Thu, 26 May 2022 17:36:33 +0100 Subject: [PATCH] Tidied up for v3 release --- .../Google.Authenticator.csproj | 4 ++-- README.md | 19 ++++++------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Google.Authenticator/Google.Authenticator.csproj b/Google.Authenticator/Google.Authenticator.csproj index 28e7e07..0e600c3 100644 --- a/Google.Authenticator/Google.Authenticator.csproj +++ b/Google.Authenticator/Google.Authenticator.csproj @@ -7,7 +7,7 @@ Google Authenticator Two-Factor Authentication Library (Not officially affiliated with Google.) Brandon Potter Brandon Potter - 3.0.0-beta2 + 3.0.0 Apache-2.0 https://github.com/BrandonPotter/GoogleAuthenticator GoogleAuthenticator @@ -29,6 +29,6 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb true - 2.0.1.0 + 3.0.0.0 diff --git a/README.md b/README.md index f2e56c3..22ecc1a 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,7 @@ Simple, easy to use server-side two-factor authentication library for .NET that [`Install-Package GoogleAuthenticator`](https://www.nuget.org/packages/GoogleAuthenticator) -## 1.x Usage -See blog post for usage instructions *(1.x only)*: - -https://csharprookie.wordpress.com/2015/03/17/implementing-free-two-factor-authentication-in-net-using-google-authenticator/ - -## 2.x Usage +## Usage *Additional examples at [Google.Authenticator.WinTest](https://github.com/BrandonPotter/GoogleAuthenticator/tree/master/Google.Authenticator.WinTest) and [Google.Authenticator.WebSample](https://github.com/BrandonPotter/GoogleAuthenticator/tree/master/Google.Authenticator.WebSample)* @@ -34,17 +29,17 @@ TwoFactorAuthenticator tfa = new TwoFactorAuthenticator(); bool result = tfa.ValidateTwoFactorPIN(key, txtCode.Text) ``` -## Updates +## Update history -### 3.0.0-beta2 -Changed from using `EscapeUriString` to `EscapeDataString` to encode the "account title" as the former is [obsolete in .Net 6](https://docs.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0013). This changes the value in the generated data string from `a@b.com` to `a%40b.com`. We have tested this with Google Authenticator, Lastpass Authenticator and Microsoft Authenticator. All three of them handle it correctl and all three recognise that it is still the same account so this should be safe in most cases. +### 3.0.0 -### 3.0.0-beta1 - Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2. - All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing. - Linux installations no longer need to ensure `libgdiplus` is installed as it is no longer used. +- Changed from using `EscapeUriString` to `EscapeDataString` to encode the "account title" as the former is [obsolete in .Net 6](https://docs.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0013). This changes the value in the generated data string from `a@b.com` to `a%40b.com`. We have tested this with Google Authenticator, Lastpass Authenticator and Microsoft Authenticator. All three of them handle it correctly and all three recognise that it is still the same account so this should be safe in most cases. ### 2.5.0 + Now runs on .Net 6.0. Technically the QR Coder library we rely on still does not fully support .Net 6.0 so it is possible there will be other niggling issues, but for now all tests pass for .Net 6.0 on both Windows and Linux. @@ -52,6 +47,4 @@ Technically the QR Coder library we rely on still does not fully support .Net 6. * Old documentation indicated specifying width and height for the QR code, but changes in QR generation now uses pixels per module (QR "pixel") so using a value too high will result in a huge image that can overrun memory allocations * Don't use the secret key and `ManualEntryKey` interchangeably. `ManualEntryKey` is used to enter into the authenticator app when scanning a QR code is impossible and is derived from the secret key ([discussion example](https://github.com/BrandonPotter/GoogleAuthenticator/issues/54)) - -# Notes -*With versions prior to 3.0*, on linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227). +* *With versions prior to 3.0 only*, on linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).