Angular-Core-IdentityServer | Using Angular with ASP.NET Core | Identity Management library
kandi X-RAY | Angular-Core-IdentityServer Summary
kandi X-RAY | Angular-Core-IdentityServer Summary
Using Angular (4+) with ASP.NET Core and IdentityServer4
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 Angular-Core-IdentityServer
Angular-Core-IdentityServer Key Features
Angular-Core-IdentityServer Examples and Code Snippets
Community Discussions
Trending Discussions on Angular-Core-IdentityServer
QUESTION
My application is composed of 2 elements: IdentityServer4 host (Asp.NET Core 2.2 application with Asp.NET identity) listening on http://localhost:5000 Angular client app (Angular v.7.2.12) listening on http://localhost:5002
I want the angular client to authenticate against IS4: the login form id the one hosted in IS4 pages. After successful login, the user should be redirected back to the angular page. For angular oidc integration, I followed the project: https://github.com/elanderson/Angular-Core-IdentityServer
The login actually works well (I see the correct token returned by IS4 and no errors in IS4 logs), but redirect URI doesn’t work. Instead of returning to the original angular page (http://localhost/5002) I have the exception “Correlation failed. Unknown location”
I tried to do the same login with another ASP.NET Core test application and it works, so it seems to be related to the angular integration.
IS4 in-memory angular client configuration
...ANSWER
Answered 2019-Apr-18 at 11:05You mixed up two different approaches: registered "gekoo.webSPA"
client with "GrantTypes.Implicit"
in IdSrv (and Angular), but also created another (ASP.NET MVC) client app, having the same name, but ResponseType = "code id_token"
. So your Angular app triggers a challenge, but the response gets handled by ASP.Net backend, which leads to the failure. Actually you can host your Angular without any MVC back at all, or use this QA as a reference.
QUESTION
I am new to OpenID and Angular, and am trying to make use of the angular-auth-oidc-client
package. There are some great examples by damienbod and elanderson, but I can't even seem to get off the starting block.
After installing the package, all I have to do is inject the OidcSecurityService
- I don't have to use it even - and I am getting a runtime error:
ANSWER
Answered 2018-Jan-20 at 01:27OK. I think I see where I went wrong. The samples are good, but they have enough complexity that that I didn't consider that the AuthModule
was part of the package. I thought it was something the samples build around the package. The brief example in the angular-auth-oidc-client README set me on the right track
So AuthModule
needs to be imported (my larger, real project did), but it also needs a call to AuthModule.forRoot()
to be included in the AppModule
imports
metadata (my larger, real project did not).
So with those updates, app.module.ts
now looks like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Angular-Core-IdentityServer
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