You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample shows how to port passkey support from a .NET 10 Blazor App project template into Duende IdentityServer.
63
+
64
+
:::note[.NET 10 preview 7]
65
+
This sample was written using the functionality available in .NET 10 preview 7.
66
+
The final .NET 10 release may provide a different API surface.
67
+
:::
68
+
69
+
It is based on the [_Duende IdentityServer with ASP.NET Core Identity_](/identityserver/overview/packaging.mdx#duende-identityserver-with-aspnet-core-identity) project template,
70
+
and adds the necessary changes to support passkey authentication:
71
+
72
+
* In `HostingExtensions.cs`, the ASP.NET Identity schema is set to `IdentitySchemaVersions.Version3`.
73
+
* An Entity Framework Core migration is added to generate the `AspNetUserPasskeys` table in the database.
74
+
* The `Passkeys/PasskeyEndpointRouteBuilderExtensions.cs` file registers required minimal API endpoints for passkey creation and passkey request options. The extension method is called in `HostingExtensions.cs`.
75
+
* The `Passkeys/PasskeyOperation.cs`, `Passkeys/PasskeySubmitTagHelper.cs` and `wwwroot/js/passkey-submit.js`files define a tag helper and web component to handle passkey creation and authentication.
76
+
*`Pages/_ViewImports.cshtml` is updated to load the tag helper.
77
+
* The `Models/PasskeyInputModel.cs` file is added and used in the `/Login/InputModel.cs` model.
78
+
* The `Login/Index.cshtml` and `Login/Index.cshtml.cs` file include the necessary logic to handle passkey authentication.
79
+
* The `Pages/Account/Passkeys.cshtml`, `Pages/Account/Passkeys.cshtml.cs`,`Pages/Account/RenamePasskey.cshtml`, and `Pages/Account/RenamePasskey.cshtml.cs` files add functionality to register a passkey credential and rename a passkey.
80
+
81
+
<LinkCard
82
+
description="GitHub Repository for the ASP.NET Identity Passkey Sample"
0 commit comments