OPTIONS requets returns 400 error while adding openiddict to asp.net core api
See original GitHub issuehi Do I need to enable cors on OpenIddict separately? because I thought adding the following codes will handle the cors but as soon as Chrome want to send an options request, my app returns 400!
services.AddCors();
and
app.UseCors(builder => builder.AllowAnyHeader() .AllowAnyMethod() .AllowAnyOrigin() );
I dont know If i need to add something else or not!
the configuration of openiddict is exactly as same as what I read from the wiki section if this project on github. and the project specifications are mentioned below
ASP.net Core v1.1 Client side : SPA Angularjs App using JWT Token
any help ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Asp.Net Core 2.1 WebApi returns 400 when sending ...
I've got an application that is represented by asp.net core 2.1 web api on the server side and angular 6 on the client...
Read more >Asp.Net Core 6 Web API - How to return only 400 Bad ...
I have an ASP.NET core Web API that I am calling 3rd party web services. I have exception middleware in order to log...
Read more >Implementing OpenID Code Flow with PKCE using OpenIddict ...
This article shows how to implement the OpenID Connect Code Flow with PKCE using OpenIddict hosted in an ASP.NET Core application, an ASP....
Read more >Live Coding OAuth using OpenIddict and .NET - YouTube
https://andreyka26.com/ OAuth implementation using OpenIddict and .NET Git: ... ASP. NET Core Authentication Schemas (.NET 7 Minimal Apis C#).
Read more >Blank page after log out #4730 | Support Center
This is a multitenant app, so I need to set a wildcard url in openiddict but it is not letting me. I'm using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You do.
You must register the CORS middleware before OpenIddict.
Don’t forget to update your CORS policy to use specific origins (
AllowAnyOrigin
is not safe).@PinpointTownes sorry for late responding , yes i used to which changing it to AddMVC fixed my issue