Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogoutLink posting to /logout without specifying a content type #149

Open
mcottingham opened this issue Dec 22, 2016 · 3 comments
Open

LogoutLink posting to /logout without specifying a content type #149

mcottingham opened this issue Dec 22, 2016 · 3 comments

Comments

@mcottingham
Copy link
Contributor

mcottingham commented Dec 22, 2016

Using ASP .Net Core with stormpath-react

The LogoutLink component issues a POST request to the backend without specifying a ContentType in the header.

Is this a bug? Or is this something that I'm doing incorrectly on my side?

It is causing .net core to respond with 400 invalid content type ''

@robertjd
Copy link
Member

The logout post doesn't have any content in the body, so a Content Type header won't be set. Is our .NET library handling the /logout route on your backend? If so this sounds like a bug we need to fix in our library, ping @nbarbettini

@nbarbettini
Copy link
Member

Yes @robertjd it looks like the .NET middleware is looking for the Content-Type header and throwing if it's not present.

Is the Accept header being set in stormpath-react?

@robertjd
Copy link
Member

It is sending Accept: application/json for the /logout POST. You can demo with https://github.com/stormpath/stormpath-express-react-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants