Passwordless 1.0.2
Prefix ReservedSee the version list below for details.
dotnet add package Passwordless --version 1.0.2
NuGet\Install-Package Passwordless -Version 1.0.2
<PackageReference Include="Passwordless" Version="1.0.2" />
paket add Passwordless --version 1.0.2
#r "nuget: Passwordless, 1.0.2"
// Install Passwordless as a Cake Addin #addin nuget:?package=Passwordless&version=1.0.2 // Install Passwordless as a Cake Tool #tool nuget:?package=Passwordless&version=1.0.2
Passwordless .NET SDK
The official Bitwarden Passwordless.dev .NET library, supporting .NET Standard 2.0+, .NET Core 2.0+ (and soon .NET Framework 4.6.1+).
Installation
Using the .NET Core command-line interface (CLI) tools:
dotnet add package Passwordless
Using the NuGet Command Line Interface (CLI):
nuget install Passwordless
Using the Package Manager Console:
Install-Package Passwordless
From within Visual Studio:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on Manage NuGet Packages...
- Click on the Browse tab and search for "Passwordless".
- Click on the Passwordless package, select the appropriate version in the right-tab and click Install.
Getting started
Follow the Get started guide
Register to Dependency Injection
// in Program.cs or Startup.cs
services.AddPasswordlessSdk(options =>
{
options.ApiSecret = "your_api_secret";
});
Register a passkey
[HttpGet("/create-token")]
public async Task<IActionResult> GetRegisterToken(string alias)
{
// Get existing userid from session or create a new user in your database
var userId = Guid.NewGuid().ToString();
// Options to give the Api
var payload = new RegisterOptions
{
UserId = userId, // your user id
Username = alias, // e.g. user email, is shown in browser ui
Aliases = new HashSet<string> { alias } // Optional: Link this userid to an alias (e.g. email)
};
try
{
var token = await _passwordlessClient.CreateRegisterTokenAsync(payload);
// return this token to the frontend
return Ok(token);
}
catch (PasswordlessApiException e)
{
return new JsonResult(e.Details)
{
StatusCode = (int)e.StatusCode,
};
}
}
Verify user
[HttpGet]
[Route("/verify-signin")]
public async Task<IActionResult> VerifySignInToken(string token)
{
try
{
var verifiedUser = await _passwordlessClient.VerifyTokenAsync(token);
// Sign the user in, set a cookie, etc,
return Ok(verifiedUser);
}
catch (PasswordlessApiException e)
{
return new JsonResult(e.Details)
{
StatusCode = (int)e.StatusCode
};
}
}
Documentation
For a comprehensive list of examples, check out the API documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
- System.Memory (>= 4.5.5)
- System.Net.Http.Json (>= 7.0.1)
- System.Text.Json (>= 7.0.3)
-
.NETStandard 2.0
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
- System.Net.Http.Json (>= 7.0.1)
- System.Text.Json (>= 7.0.3)
-
net6.0
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
-
net7.0
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Passwordless:
Package | Downloads |
---|---|
Passwordless.AspNetCore
The official Bitwarden Passwordless.dev .NET library for ASP.NET Core identity |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.0-beta.4 | 1,404 | 10/4/2024 |
2.1.0-beta.3 | 403 | 9/9/2024 |
2.1.0-beta.2 | 736 | 8/26/2024 |
2.1.0-beta.1 | 720 | 8/14/2024 |
2.0.0 | 1,105 | 8/13/2024 |
2.0.0-beta9 | 130 | 7/29/2024 |
2.0.0-beta8 | 3,156 | 4/11/2024 |
2.0.0-beta7 | 2,314 | 3/11/2024 |
2.0.0-beta6 | 285 | 2/16/2024 |
2.0.0-beta5 | 9,994 | 11/8/2023 |
2.0.0-beta4 | 146 | 10/27/2023 |
2.0.0-beta3 | 144 | 10/25/2023 |
2.0.0-beta2 | 156 | 10/4/2023 |
2.0.0-beta10 | 324 | 8/6/2024 |
2.0.0-beta1 | 1,317 | 9/29/2023 |
1.0.2 | 11,757 | 9/4/2023 |
0.0.14 | 935 | 8/14/2023 |
0.0.12 | 232 | 8/8/2023 |
0.0.11 | 188 | 8/8/2023 |
0.0.11-beta1 | 293 | 8/8/2023 |
0.0.0-ci-d5f30b6 | 105 | 5/21/2024 |