# Not sure if I have an okta problem or my own mistake

**URL:** <https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874>\
**Category:** Questions\
**Created:** [September 8, 2020, 10:11pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874 "2020-09-08T22:11:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 8, 2020, 10:11pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/1 "2020-09-08T22:11:01Z")

</div>

Hello having a unauthorized issue when logging into my app any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [September 8, 2020, 10:15pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/2 "2020-09-08T22:15:13Z")

</div>

What kind of application is it (OIDC? SAML?) and what kind of error are you seeing?

---

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 8, 2020, 10:17pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/3 "2020-09-08T22:17:14Z")

</div>

It’s OIDC I believe. It’s a react app that I thought I had working but I keep getting a 401 unauthorized for some reason.

---

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 8, 2020, 10:19pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/4 "2020-09-08T22:19:15Z")

</div>

When I check the console in the browser it shows an xhr error but I can’t seem to find anything specific.

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [September 8, 2020, 11:32pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/5 "2020-09-08T23:32:29Z")

</div>

Add the URL to your Okta org in API \> Trusted Origins. For example, `http://localhost:3000`

---

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 8, 2020, 11:53pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/6 "2020-09-08T23:53:29Z")

</div>

> [@mraible](#):
>
> [http://localhost:3000](http://localhost:3000)

I did that but still getting the same error unfortunately. It seems like I have 3 tokens in local storage let me send you a picture.

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/2/291b06add757e0f0d3da4be6f21b27e4db6a2297.png)

---

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 9, 2020, 2:30am UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/7 "2020-09-09T02:30:57Z")

</div>

This is basically I need left to finally finish this app so any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![IanHakes](https://avatars.discourse-cdn.com/v4/letter/i/ccd318/32.png) [@IanHakes](https://devforum.okta.com/u/IanHakes)\
**Post date:** [September 9, 2020, 9:50pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/8 "2020-09-09T21:50:01Z")

</div>

Does this look like your issue at all?

[https://support.okta.com/help/s/article/400-error-on-authentication-to-Okta-using-OIDC?language=en\_US](https://support.okta.com/help/s/article/400-error-on-authentication-to-Okta-using-OIDC?language=en_US)

---

<div class="post-metadata">

**Author:** ![stuck](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@stuck](https://devforum.okta.com/u/stuck)\
**Post date:** [September 10, 2020, 6:21pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/9 "2020-09-10T18:21:49Z")

</div>

No unfortunately im getting a 401 even though it allows me to login. This is the error I see in the login.

 ![Annotation 2020-09-08 173449](https://global.discourse-cdn.com/oktadev/original/2X/9/941eab8879ac220d85faff655c99df6ba3353117.png)

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [September 15, 2020, 10:00pm UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/10 "2020-09-15T22:00:25Z")

</div>

@stuck is the /jobs route one that requires the user being authorized in order to access it? How are you protecting this route/how is it checking to see if the user is allowed to access it and are you using okta-react to do so?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 25, 2024, 12:28am UTC](https://devforum.okta.com/t/not-sure-if-i-have-an-okta-problem-or-my-own-mistake/10874/11 "2024-01-25T00:28:04Z")

</div>

Closed on January 25, 2024, 12:28am UTC


