# Navigation to website returns 'Unauthorized' rather than redirect to auth0 login page

**URL:** <https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933>\
**Category:** Get Help\
**Tags:** redirect, callback, login\
**Created:** [December 11, 2018, 12:46am UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933 "2018-12-11T00:46:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjlafazan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rjlafazan/32/9734_2.png) [@rjlafazan](https://community.auth0.com/u/rjlafazan)\
**Post date:** [December 11, 2018, 12:46am UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/1 "2018-12-11T00:46:59Z")

</div>

I think I am having an issue with the callback urls or maybe I’m missing something… I built a gitbook with Auth0 using [gitbook-express-auth0-boilerplate](https://github.com/sandrinodimattia/gitbook-express-auth0-boilerplate).

When I navigate to localhost:4001, it returns ‘Unauthorized’ the only way to login is to navigate directly to localhost:4001/login/callback. I have the same issue from any web domain I have connected and cannot seem to find any good information to fix this issue.

Any advice is greatly appreciated.

Thank you

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 31, 2018, 7:30pm UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/2 "2018-12-31T19:30:27Z")

</div>

Hey there @rjlafazan, I would like to help you over come this challenge. When you get a moment can you send me your tenant and snag me a HAR file during the stated workflow so I can get a deeper look at what may be going on? Thanks in advance!

> **[Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/troubleshooting-tools/generate-and-analyze-har-files)**
>
> Learn how to troubleshoot with HAR files and steps to generate a HAR file.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [January 4, 2019, 4:48pm UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/4 "2019-01-04T16:48:38Z")

</div>

I was hoping to follow up with you @rjlafazan to see how things are going on snagging that tenant name and HAR file? Please let me know if I can be of any further assistance. Thank you.

---

<div class="post-metadata">

**Author:** ![rjlafazan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rjlafazan/32/9734_2.png) [@rjlafazan](https://community.auth0.com/u/rjlafazan)\
**Post date:** [January 5, 2019, 1:14am UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/5 "2019-01-05T01:14:13Z")

</div>

Hey James, I managed to solve this problem. Maybe you can help me with a separate issue though. I am trying to restrict navigation to specific sections of my gitbook to specific users either by assigning roles (preferred) or creating a list of accepted emails manually. Is there an easy way to do this? I have had a difficult time understanding how this is done in auth0.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [January 7, 2019, 2:08pm UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/6 "2019-01-07T14:08:25Z")

</div>

You can leverage a rule to create a role for a user which sounds like a great fit for what you are trying to accomplish, we actually have a doc on that below with sample code. Please let me know if this ends up helping you in your quest!

> **[Create Roles](https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/create-roles)**
>
> Learn how to create a role using the Auth0 Dashboard or the Management API.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [January 21, 2019, 6:11pm UTC](https://community.auth0.com/t/navigation-to-website-returns-unauthorized-rather-than-redirect-to-auth0-login-page/18933/7 "2019-01-21T18:11:06Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
