Passwordless.AspNetCore 1.0.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Passwordless.AspNetCore --version 1.0.3
NuGet\Install-Package Passwordless.AspNetCore -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Passwordless.AspNetCore" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Passwordless.AspNetCore --version 1.0.3
#r "nuget: Passwordless.AspNetCore, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Passwordless.AspNetCore as a Cake Addin
#addin nuget:?package=Passwordless.AspNetCore&version=1.0.3

// Install Passwordless.AspNetCore as a Cake Tool
#tool nuget:?package=Passwordless.AspNetCore&version=1.0.3

Passwordless ASP.NET Core Integration

The official Bitwarden Passwordless.dev ASP.NET Identity integration. Automatically adds endpoints to verify passwordless signin and sign the user in using the existing ASP.NET Identity code.

Installation

Nuget Package

Using the .NET Core command-line interface (CLI) tools:

dotnet add package Passwordless.AspNetCore

Using the NuGet Command Line Interface (CLI):

nuget install Passwordless.AspNetCore

Using the Package Manager Console:

Install-Package Passwordless.AspNetCore

From within Visual Studio:

  1. Open the Solution Explorer.
  2. Right-click on a project within your solution.
  3. Click on Manage NuGet Packages...
  4. Click on the Browse tab and search for "Passwordless.AspNetCore".
  5. Click on the Passwordless package, select the appropriate version in the right-tab and click Install.

Usage

In Minimal APIs

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddIdentity<MyUser, MyRole>()
      .AddEntityFrameworkStores<MyDbContext>()
      .AddPasswordless(builder.Configuration.GetRequiredSection("Passwordless"));

var app = builder.Build();

app.MapPasswordless();

app.Run();

In MVC

// In Startup.cs
public void ConfigureServices(IServiceCollection services)
{
    services.AddIdentity<MyUser, MyRole>()
      .AddEntityFrameworkStores<MyDbContext>()
      .AddPasswordless(Configuration.GetRequiredSection("Passwordless"));

    services.AddControllers();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    app.UseRouting();

    app.UseAuthentication();
    app.UseAuthorization();

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapPasswordless();
        endpoints.MapControllers();
    });
}

Documentation

For a comprehensive list of examples, check out the API documentation.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0-beta8 614 4/11/2024
2.0.0-beta7 1,991 3/11/2024
2.0.0-beta6 232 2/16/2024
2.0.0-beta5 9,896 11/8/2023
2.0.0-beta4 89 10/27/2023
2.0.0-beta3 86 10/25/2023
2.0.0-beta2 105 10/4/2023
2.0.0-beta1 1,259 9/29/2023
1.0.3 1,065 9/5/2023
1.0.2 117 9/4/2023
0.0.13 507 8/28/2023
0.0.12 136 8/8/2023
0.0.11 123 8/8/2023