# Getting an error of JWT in the browser

**URL:** <https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706>\
**Category:** JWT.io\
**Tags:** jwt, react\
**Created:** [May 22, 2024, 12:15pm UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706 "2024-05-22T12:15:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rituraj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rituraj/32/51026_2.png) [@Rituraj](https://community.auth0.com/u/Rituraj)\
**Post date:** [May 22, 2024, 12:15pm UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706/1 "2024-05-22T12:15:08Z")

</div>

I am trying to create a Signup/Signin application using mern stack and JWT but can’t run the application on the browser and getting some error -

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/f/6f88e80ad7db5c69fca27f3aef0c75fdbef23f75.png)

github link of the code - [GitHub - Rituraj-13/Auth: A simple mern auth system with JWT](https://github.com/Rituraj-13/Auth/tree/main)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 22, 2024, 9:22pm UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706/3 "2024-05-22T21:22:15Z")

</div>

Hi @Rituraj,

Welcome to the Auth0 Community!

Can you share what Auth0 SDK you are using for your app?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![Rituraj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rituraj/32/51026_2.png) [@Rituraj](https://community.auth0.com/u/Rituraj)\
**Post date:** [May 23, 2024, 4:07am UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706/4 "2024-05-23T04:07:58Z")

</div>

I am using JWT in my React(Vite) project.

[[GitHub Link](https://github.com/Rituraj-13/Auth/tree/main) ]

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 23, 2024, 4:29pm UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706/5 "2024-05-23T16:29:08Z")

</div>

Hi @Rituraj,

I have reviewed your screenshot and noticed that the error is throwing an “Uncaught TypeError.” This happens when you try to use or access an undefined variable. In this case, it expects it to be either an object or null.

Next, it seems like you are using the `jsonwebtoken` library to build your auth flows.

I suggest referring to one of Auth0 quickstart SDKs to get started with a working sample app:

- [Auth0 Quickstarts](https://auth0.com/docs/quickstarts)

Let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 6, 2024, 4:29pm UTC](https://community.auth0.com/t/getting-an-error-of-jwt-in-the-browser/134706/6 "2024-06-06T16:29:32Z")

</div>

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