# Unable to issue redirect for OAuth 2.0 transaction - Vite, React (JSX), .env

**URL:** <https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-vite-react-jsx-env/99207>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [January 28, 2023, 6:22pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-vite-react-jsx-env/99207 "2023-01-28T18:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LupuC](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lupuc/32/44092_2.png) [@LupuC](https://community.auth0.com/u/LupuC)\
**Post date:** [January 28, 2023, 6:22pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-vite-react-jsx-env/99207/1 "2023-01-28T18:22:26Z")

</div>

Hi, so I’ve been trying to create a login system using Auth0.  
This is the repo I’ve used:

> **[GitHub - codeSTACKr/react-auth0](https://github.com/codeSTACKr/react-auth0)**
>
> Contribute to codeSTACKr/react-auth0 development by creating an account on GitHub.

I have the url and cliend id inside .env, it redirects me to login, then i get this

 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/9/c9b10567e940ec7d38de1af36d3caed33b338653.png)

On Auth0 settings, I’ve added [http://localhost:3000](http://localhost:3000) to:  
Allowed Callbacks Url, Allowed Logout Url and Allowed web origins.

Also, I’ve updated the main.jsx file to:

```auto
const root = document.getElementById('root');
ReactDOM.createRoot(root).render(
  <Auth0Provider
    domain={domain}
    clientId={clientId}
    redirectUri={window.location.origin}>
    <App />
  </Auth0Provider>
);

```

Any ideas? Thank you!

---

<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:** [January 30, 2023, 8:13am UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-vite-react-jsx-env/99207/2 "2023-01-30T08:13:50Z")

</div>

Hey there!

Unfortunately we won’t be able to help you here as the repo you are referencing is not developed and maintained by Auth0/Okta so it will be hard to take responsibility for someone’s else job 🙂 However for React we have guidance here:

> **[GitHub - auth0/auth0-react: Auth0 SDK for React Single Page Applications (SPA)](https://github.com/auth0/auth0-react)**
>
> Auth0 SDK for React Single Page Applications (SPA) - GitHub - auth0/auth0-react: Auth0 SDK for React Single Page Applications (SPA)

---

<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:** [February 13, 2023, 8:13am UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-vite-react-jsx-env/99207/3 "2023-02-13T08:13:52Z")

</div>

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