© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
Naptie

❔ OpenIddict Tokens' Availability Depends On Request's Origin

I'm using ASP.NET Core with OpenIddict authentication as the backend of my website. On the frontend, I decided to make it request the API at localhost rather than the public API URL during SSR, since they serve on the same machine. However, after I finished implementing it, the frontend started throwing 401 in every case when the user's identity is required. And it turns out that, assuming users login with localhost, their tokens are only usable when the request origin is localhost, otherwise the API will throw 401.

Is there some workaround that can disable this check?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ CORS: Cross-Origin Request Blocked
C#CC# / help
4y ago
Implementing OpenIddict in Blazor Hybrid
C#CC# / help
13mo ago
OpenIddict client: "openiddict client: A challenge response cannot be returned from this endpoint."
C#CC# / help
2mo ago
Blazor Design: Expression Service That Depends on other Objects
C#CC# / help
2y ago