KeeOtp2 is a simple NuGet package to determine which website supports which type of 2fa. Therefore it uses the twofactorauth API, which is provided by GitHub user 2factorauth. (They also have a frontend application, which you can find here.)
This guide is for Visual Studio only
- Right-click on your project in the Solution Explorer
- Select Manage NuGet Packages
- Click Browse and search for TwoFactorAuthDirectory
- Select the one by tiuub and install it
...
TwoFactorAuthClient client = new TwoFactorAuthClient();
// Setting a custom API url (optional)
client.ApiUrl = "https://twofactorauth.tiuub.de/frozen/2022-07-06/api/v3/all.json";
// Fetching websites from API asynchronously
List<Website> websites = client.FetchAsync().Result;
// Fetching websites from API synchronously
List<Website> websites = client.Fetch();
...
...
TwoFactorAuthClient client = new TwoFactorAuthClient();
List<Website> websites = client.Fetch();
// Find all websites which are supporting anything
List<Website> websitesByName = websites.FindAll(website => website.IsSupportingAny());
// Find all websites which are supporting TfyTypes.Totp or TfaTypes.Sms
List<Website> websitesByName = websites.FindAll(website => website.IsSupporting(TfaTypes.Totp | TfaTypes.Sms));
// Find all websites which include "Google" in their name
List<Website> websitesByName = websites.FindByName("Google", ignoreCase: true);
// Find all websites which have the exact domain "mail.google.com"
List<Website> websitesByDomain = websites.FindByDomain("mail.google.com");
// Find all websites which have parts of the given url in their url field or in their additional_domains/domain field
List<Website> websitesByUrl = websites.FindByUrl("https://log:[email protected]/test-path?test-parameter:123");
// Find all websites which supports a specific type of tfa
List<Website> websitesByTfa = websites.FindByTfa(TfaTypes.Totp | TfaTypes.Sms);
// Find all websites which are subjected by specific keywords
List<Website> websitesByKeywords = websites.FindByKeywords(new List<String>() { "email", "security" });
// Find all websites which are subjected by specific regions
List<Website> websitesByRegions = websites.FindByRegions(new List<String>() { "us", "de" });
...
Dependencie | Source | NuGet | Author | License |
---|---|---|---|---|
Newtonsoft.Json | source | NuGet | newtonsoft | MIT |
Microsoft.Net.Http | Project website | NuGet | Microsoft, dotnetframework | License |
Microsoft.Bcl.Async | Project website | NuGet | Microsoft, dotnetframework | License |
Dependencie | Source | NuGet | Author | License |
---|---|---|---|---|
coverlet.collector | source | NuGet | tonerdo | MIT |
Microsoft.NET.Test.Sdk | source | NuGet | Microsoft | MIT |
MSTest.TestAdapter | source | NuGet | Microsoft | MIT |
MSTest.TestFramework | source | NuGet | Microsoft | MIT |