Samples.AspNetCore-IdentityServer4 | IdentityServer4 sample with .NET Core | OAuth library
kandi X-RAY | Samples.AspNetCore-IdentityServer4 Summary
kandi X-RAY | Samples.AspNetCore-IdentityServer4 Summary
IdentityServer4 sample with .NET Core and ASP.NET Core 2.0
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Samples.AspNetCore-IdentityServer4
Samples.AspNetCore-IdentityServer4 Key Features
Samples.AspNetCore-IdentityServer4 Examples and Code Snippets
Community Discussions
Trending Discussions on Samples.AspNetCore-IdentityServer4
QUESTION
I'm trying to use identity server 4 as a SSO site with a front-end written as an SPA (framework not important)
The Example project uses MVC, which when the user logs in the page posts to a controller that redirects the browser to the return URL.
I'm having trouble modifying this flow to work in a more AJAX fashion. Firstly I want to be able to submit the username/password to an API controller so that I can get back validation errors etc without doing a page refresh. Given a successful login I then need to redirect the browser to the returnUrl, but I cannot get this to work and the callback url returns the user back to the login page again rather than redirecting to the client app logged in.
This is what my login endpoint looks like:
...ANSWER
Answered 2018-Mar-02 at 05:37After investigating some logs and watching the requests a little more carefully I realised that the login response from the AJAX request was not setting the authentication cookie on the browser.
Setting the credentials
option in the fetch request to 'same-origin'
fixed the issue
thanks to this stackoverflow answer: https://stackoverflow.com/a/39233628
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Samples.AspNetCore-IdentityServer4
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page