asgardeo / asgardeo-auth-react-sdk

To maintain the implementation of Asgardeo React authentication SDK
Apache License 2.0
40 stars 91 forks source link

Add specific error pages for ID token validation failures #193

Closed pandukakarunasena closed 1 year ago

pandukakarunasena commented 1 year ago

Purpose

Add specific error pages for ID token validation failures. This will fix the https://github.com/asgardeo/asgardeo-auth-react-sdk/issues/192

Goals

This fix adds a specific error page for issuer claim validation failure of the ID token. Furthermore a generic error page is implemented to handle ID token verification failures.

Approach

Issuer claim validation failure is implemented by adding a specific error page rendered according to the error code returned by the jose library when issuer claim validation is failed. Similarly the generic error page for ID token verification failures is also implemented by leveraging the error code returned by the jose library.