1

The IdentityServer returns 401 if the token request validator returns false. It returns with an error message.

Using angular-auth-oidc-client, with response type is code, from SPA redirects to authority and redirects to /unauthorized, in the console log, it said

angular-auth-oidc-client.mjs:193 
    
[ERROR] 0-app-name - OidcService code request https://localhost:44379 () => new Error(error)

It's true with the error message:

error: "Cross login error"
error_description: "Cannot access to App due to policy"

How can I catch that error from my app, currently I don't see any public APIs of angular-auth-oidc-client that can support that. The reason to catch the error is that I want to show the error message on /unauthorized page

Steve Lam
  • 979
  • 1
  • 17
  • 40

0 Answers0