dotnet / dotnet/AspNetCore.Docs

Certificate Authentication custom authentication does not work

Open
#33,766 0 comments 0 reactions 0 assignees View on GitHub
:watch: Not Triaged aspnet-core/svc security/subsvc Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 2h
Merged PRs (30d)
109

Description

### Description

I followed the instructions precisely in my implementation; however, the browser prompts me for a certificate, and no matter what certificate I select, I am always allowed to view the swagger UI for my API. My custom authentication works and calls context.Fail("Fail reason"); but that code does nothing. It still authenticates and displays the swagger UI. Please help.

### Page URL

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-8.0

### Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/certauth.md

### Document ID

d2db534b-198a-dc99-5b5a-0525582d39ac

### Article author

@blowdart

[Related Issues](https://github.com/dotnet/AspNetCore.Docs/issues?q=is%3Aissue+is%3Aopen+d2db534b-198a-dc99-5b5a-0525582d39ac)

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.