I'm using ASP.NET Core IdentityServer4 as the IdP and oidc-client library in my Angular project to integrate the id service. However, after user login, following error occurred twice in the web browser console:
VM10 vendor.js:12638 ERROR Error: Uncaught (in promise): ErrorResponse: login_required
ErrorResponse: login_required
at new e (VM10 vendor.js:49237)
at t [as _processSigninParams] (VM10 vendor.js:49237)
at t [as validateSigninResponse] (VM10 vendor.js:49237)
at VM10 vendor.js:49237
at ZoneDelegate.invoke (VM7 polyfills.js:10689)
at Object.onInvoke (VM10 vendor.js:34843)
at ZoneDelegate.invoke (VM7 polyfills.js:10688)
at Zone.run (VM7 polyfills.js:10451)
at VM7 polyfills.js:11593
at ZoneDelegate.invokeTask (VM7 polyfills.js:10723)
at resolvePromise (VM7 polyfills.js:11530)
at VM7 polyfills.js:11437
at asyncGeneratorStep (VM10 vendor.js:61578)
at _throw (VM10 vendor.js:61601)
at ZoneDelegate.invoke (VM7 polyfills.js:10689)
at Object.onInvoke (VM10 vendor.js:34843)
at ZoneDelegate.invoke (VM7 polyfills.js:10688)
at Zone.run (VM7 polyfills.js:10451)
at VM7 polyfills.js:11593
at ZoneDelegate.invokeTask (VM7 polyfills.js:10723)
My ASP.NET Core IdentityServer4 has the following client configuration:
In the above code, when authService.completeAuthentication() is called in the AuthCallbackComponent, it will then call the signinRedirectCallback method, this is where the error was reported. I just tried several approaches to refine the code flow, but looks like none worked. Did I miss anything? Could someone please help on this?
I'm using ASP.NET Core IdentityServer4 as the IdP and oidc-client library in my Angular project to integrate the id service. However, after user login, following error occurred twice in the web browser console:
My ASP.NET Core IdentityServer4 has the following client configuration:
In my Angular front-end app, I created the following
AuthService
:Since I configured the redirect_uri to be under the route
auth-callback
, I then created the followingAuthCallback
component:And certainly I put it into the route config such that
auth-callback
could be redirected to theAuthCallbackComponent
:Finally, I used the
AuthService
in one of my app component:In the above code, when
authService.completeAuthentication()
is called in theAuthCallbackComponent
, it will then call thesigninRedirectCallback
method, this is where the error was reported. I just tried several approaches to refine the code flow, but looks like none worked. Did I miss anything? Could someone please help on this?Thanks in advance!