# How to get login error information in the redirect destination page, at login callback?

**URL:** <https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331>\
**Category:** Get Help\
**Tags:** logincallback, login-error, error, angular, login\
**Created:** [October 14, 2021, 3:56pm UTC](https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331 "2021-10-14T15:56:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yas/32/31026_2.png) [@Yas](https://community.auth0.com/u/Yas)\
**Post date:** [October 14, 2021, 3:56pm UTC](https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331/1 "2021-10-14T15:56:41Z")

</div>

that’s a very simle issue.  
currently, my app (SPA, Angular 12) has only 3pages. root, logincallback and error.

```auto
redirectUri: http://localhost:4200/logincallback
errorPath: /error

```

in this case, if a blocked user try to log in my app, Auth0 will callback with error like below

```auto
http://localhost:4200/logincallback?error=unauthorized&error_description=user%20is%20blocked&state=xxxxxx

```

but auth0 library redirects to `/error` without query parameter automatically and quickly (by `errorPath` configuration), so I can not get error reason like “unauthorized, user is blocked” and so on.

please tell me how to get error at the automatic redirect destination.

plartform: Angular 12  
SDK: auth0/auth0-angular 1.17.0

---

<div class="post-metadata">

**Author:** ![Yas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yas/32/31026_2.png) [@Yas](https://community.auth0.com/u/Yas)\
**Post date:** [October 21, 2021, 4:25pm UTC](https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331/2 "2021-10-21T16:25:40Z")

</div>

I figured out the solution from the official sample as below by myself.

> <https://github.com/auth0-samples/auth0-angular-samples/blob/master/Sample-01/src/app/pages/error/error.component.ts>

```auto
// get error object from library, at the component that is set in errorPath option.
public error$: Observable<any> = this.auth.error$;

```

and we need to add more small code to html.  
we can see useful code at above link.

thank you so much!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 25, 2021, 6:39am UTC](https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331/4 "2021-10-25T06:39:59Z")

</div>

Thanks for sharing that with the rest of community @Yas !

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 28, 2021, 12:02pm UTC](https://community.auth0.com/t/how-to-get-login-error-information-in-the-redirect-destination-page-at-login-callback/71331/5 "2021-10-28T12:02:13Z")

</div>


