dotnet / dotnet/aspnetcore

blazor template with passkey support causes scary looking popup in browser

Open
#66,705 1 comment 0 reactions 0 assignees View on GitHub
area-identity bug
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Using Microsoft.DotNet.Web.ProjectTemplates (9.0.16), I created a new blazor app:

dotnet new blazor -o PasskeysExample --auth Individual

When visiting the resulting website (serving via kestrel, https , with letsencrypt certificate) , Edge and Firefox both show the following, scary looking popup warning:

“redacted.org:5020 wants to access other apps and services on this device”

Now I know this is related to the passkey support accessing `navigator.credentials.create()` and `navigator.credentials.get()`, but to a regular end user this message looks like this is an unsafe website. Asking copilot for a fix resulted in the suggestion to strip passkey support completely.

### Expected Behavior

Either a way to avoid that warning popup completely, or to delay it until the user does some action to actively attempt a passkey login (this way there's a better chance of the user relating the popup to something passkey related).

### Steps To Reproduce

- dotnet new blazor -o PasskeysExample --auth Individual
- visit the resulting site via a real hosted url

### Exceptions (if any)

_No response_

### .NET Version

10.0.300

### Anything else?

Firefox 150.0.3
Edge Version 148.0.3967.54 (Official build) (64-bit)
[dotnetinfo.txt](https://github.com/user-attachments/files/27853639/dotnetinfo.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.