ActiveLogin.Authentication enables an application to support Swedish BankID (svenskt BankID) authentication in .NET.
Active Login is licensed is provided under the very permissive MIT license for you to be able to use it in commercial or non-commercial applications without many restrictions. Active Login is provided "as is", without any warrany of any kind. If you need support, commercial support and training is available.
Active Login is not a product created by BankID. It is an unofficial project that was developed by Active Solution. All trademarks are the property of their respective owners.
Screenshots on how the default UI for Native BankID looks on different devices.
Screenshot on monitoring dashboard.
Note: This Readme reflects the state of our main branch and the code documented here might not be released as packages on NuGet.org yet. For early access, see our CI builds.
CI-builds from main of all packages are available in our GitHub Packages feed.
Project | Description | NuGet | Downloads |
---|---|---|---|
BankId.Api | API client for the Swedish BankID REST API. | ||
BankId.Core | Core functionality for the BankID flow. | ||
BankId.AspNetCore | ASP.NET authentication module for Swedish BankID. | ||
BankId.AzureKeyVault | Azure KeyVault integrations for the AspNetCore package. | ||
BankId.AzureMonitor | Azure Monitor (Application Insights) integrations for the AspNetCore package. | ||
BankId.QRCoder | QR code generation using QRCoder the AspNetCore package. | ||
BankId.UAParser | Device and browser detection using UAParser. |
Full documentation with step by step instructions, samples, customization and details on how to configure the options is available here:
Documentation for ActiveLogin.Authentication.BankID
Active Login is designed to make it easy to get started with BankID in .NET. The most basic setup looks like this:
// Common
services
.AddBankId(bankId =>
{
bankId.UseTestEnvironment();
});
// Auth
services
.AddAuthentication()
.AddBankIdAuth(bankId =>
{
bankId.AddSameDevice();
});
// Sign
services
.AddBankIdSign(bankId =>
{
bankId.AddSameDevice();
});
For more use cases, samples and inspiration; feel free to browse our unit tests and samples.
Note: These are samples on how to use Active Login in different situations and might not represent optimal way of setting up ASP.NET MVC, IdentityServer or other components. Please see them as inspiration.
Project | Description |
---|---|
IdentityServer.ClientSample | ASP.NET MVC site using the IdentityServer.ServerSample as auth provider. |
IdentityServer.ServerSample | IdentityServer with Active Login as auth provider for BankID. |
Standalone.MvcSample | ASP.NET MVC with Active Login as auth provider for BankID. Also demo of Sign. |
AzureProvisioningSample | ARM template with Azure KeyVault, Azure App Service, Azure Monitor / Application Insights etc. |
Phone.ConsoleSample | Console application with a simple Phone Auth/Sign example |
Please note that IdentityServer.ClientSample uses IdentityServer.ServerSample as the IdentityProvider, so the IdentityServer.ClientSample is a good place to start.
A live demo is available at https://demo.activelogin.net/.
Here is a summary of common, general technical questions.
The docs for ActiveLogin.Authentication.BankId contains an FAQ specific to BankID.
For commercial / business related questions, see the FAQ at ActiveLogin.net.
The API-wrapper (ActiveLogin.Authentication.BankId.Api) target .NET Standard 2.0, so it can be used from .NET >= 5.0, .NET Core >= 2.0 and .NET Framework >= 4.6.1, see full reference here. The package that target .NET Standard is strong named as it can be used from .NET Framework where strong naming can be relevant.
The authentication module (.AspNetCore), depend on ASP.NET 8 and therefore requires .NET 8. The core module (.Core), and related packages, depend on and requires .NET 8.
Our samples target .NET 8 and follow the conventions used there.
Active Login is built using .NET, make sure you have the relevant version of the SDK and runtime installed.
Run the following command in the root to build all projects:
dotnet build
Run the following command in the root to run all tests:
dotnet test
We also support devcontainer.json so that you can build the solution in a container and use GitHub Codespaces.
The samples are configured to run for the test environment (no BankID certificate required as it's bundled with the library) by default. The Standalone.MvcSample is using the the most basic sample and is a good start.
To run the sample: Navigate to /Samples/Standalone.MvcSample/
and run:
dotnet run
Azure AD B2C supports using custom identity providers that supports Open ID Connect. If you deploy Active Login as part of IdentityServer (see our samples) you can configure your Azure AD B2C to federate to that instance and by doing so get BankID support.
Active Login is an Open Source project built on .NET that makes it easy to integrate with leading Swedish authentication services like BankID.
In our Security Policy you can read about how to report a vulnerability, how to subscribe to security alerts and what packages we currently support.
We are very open to community contributions to Active Login. Please see our contribution guidelines before getting started.
Thank you to all who have and are contributing to this project!
The three primary ways to interact and stay updated with Active Login are:
Active Login is licensed under the very permissive MIT license for you to be able to use it in commercial or non-commercial applications without many restrictions.
The BankID certificates from the BankID documentation are released as part of Active Login with the permission from BankID (Finansiell ID-Teknik BID AB).
All trademarks are the property of their respective owners.
Active Login is built on or uses the following great open source products:
For samples, these great products are used:
Active Solution is the main sponsor of Active Login. Active Solution is located in Sweden and provides IT consulting with focus on web, Azure and AI.
Bright cloud solutions - System development that shines. Together, we create systems that will rocket your business.
And yes, we are hiring :woman_technologist: :)
https://www.activesolution.se/
If you need help with implementing Active Login, there are commercial support & training options available.
We can help you out with:
See ActiveLogin.net for more details on how to get in touch with us :telephone_receiver:.