# Stuggling with "Unable to issue redirect for OAuth 2.0 transaction"

**URL:** <https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230>\
**Category:** Get Help\
**Tags:** other, test\
**Created:** [February 10, 2023, 11:40pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230 "2023-02-10T23:40:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamdenais](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adamdenais/32/44551_2.png) [@adamdenais](https://community.auth0.com/u/adamdenais)\
**Post date:** [February 10, 2023, 11:40pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/1 "2023-02-10T23:40:12Z")

</div>

Hello everyone,

Struggling to get past the error mentioned in the topic… I have gone through various similar posts for this error and understand the issue is usually a typo. However, I have tried to copy-paste from the docs as much as possible explicitly. That being said, I cannot identify what is wrong with my code! I would appreciate any guidance and am willing to share any other info needed. I really appreciate any help you can provide.

Apologies in advance. I did not understand which tags fit this situation!

This is the error log:

```auto
{
  "date": "2023-02-10T22:55:48.384Z",
  "type": "f",
  "description": "Unable to issue redirect for OAuth 2.0 transaction",
  "connection": "github-users-db",
  "connection_id": "con_M0Iq03c8kVDZQeMm",
  "client_id": "dF0awL5MjYges1UFPRBj7Qs1Mt4W0LKL",
  "client_name": "Github Users",
  "ip": "2603:8080:7300:97a:9481:e844:c78c:ccd9",
  "user_agent": "Chrome 109.0.0 / Windows 10.0.0",
  "details": {
    "body": {},
    "qs": {
      "state": "eJwcEpB_1uKG0irzcsPDPQP-XaANXfCp"
    },
    "connection": "github-users-db",
    "error": {
      "message": "Unable to issue redirect for OAuth 2.0 transaction",
      "oauthError": "server_error",
      "type": "oauth-authorization"
    },
    "session_id": "2-iS9_z0C-2CTxgHOqD6MfIKlJhY-eqh"
  },
  "hostname": "dev-yhy2r863cr3afldj.us.auth0.com",
  "user_id": "auth0|63e5341674eb8928e0b4327c",
  "user_name": "adamdenais@gmail.com",
  "strategy": "auth0",
  "strategy_type": "database",
  "audience": "https://dev-yhy2r863cr3afldj.us.auth0.com/userinfo",
  "scope": [
    "openid",
    "profile",
    "email"
  ],
  "log_id": "90020230210225549617889504823857192080197423698976702482",
  "_id": "90020230210225549617889504823857192080197423698976702482",
  "isMobile": false,
  "id": "90020230210225549617889504823857192080197423698976702482"
}

```

This is my index.js code:

```auto
import { Auth0Provider } from "@auth0/auth0-react";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <React.StrictMode>
    <Auth0Provider
      domain="dev-yhy2r863cr3afldj.us.auth0.com"
      clientId="dF0awL5MjYges1UFPRBj7Qs1Mt4W0LKL"
      authorizationParams={{
        redirect_uri: window.location.origin
      }}
    >
      <GithubProvider>
        <App />
      </GithubProvider>
    </Auth0Provider>
  </React.StrictMode>
);

```

This is my related login code in my Navbar component:

```auto
import { useAuth0 } from "@auth0/auth0-react";

const Navbar = () => {
  const { loginWithRedirect } =
    useAuth0();

  return (
        <button onClick={() => loginWithRedirect()}>Login</button>
  );
};

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 11, 2023, 12:16am UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/3 "2023-02-11T00:16:12Z")

</div>

Hi there @adamdenais welcome to the community!

- Have you made sure that the `redirect_uri` is added as an allowed callback in the app settings in your Auth0 dashboard?

- If you inspect the network tab as you attempt the login flow, does the `redirect_uri` param of the call to `/authorize` look correct?

I would start here for sure 🙂 It might also be worth taking a step back and keying our [react sample](https://github.com/auth0-samples/auth0-react-samples) app to your environment in order to test/compare against.

Keep us posted!

---

<div class="post-metadata">

**Author:** ![adamdenais](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adamdenais/32/44551_2.png) [@adamdenais](https://community.auth0.com/u/adamdenais)\
**Post date:** [February 11, 2023, 1:25am UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/4 "2023-02-11T01:25:43Z")

</div>

I appreciate the thoughtful response!  
Any other thoughts based on this:

- In my allowed callback in the app settings I simply have: [http://localhost:3000](http://localhost:3000)

- After inspecting the network tab I see that their is a 500 error that starts with “authorize?authorizationParams=…”

Still pretty new to coding but trying my best! I’ll check out the sample app tomorrow and dive through it.

---

<div class="post-metadata">

**Author:** ![adamdenais](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adamdenais/32/44551_2.png) [@adamdenais](https://community.auth0.com/u/adamdenais)\
**Post date:** [February 11, 2023, 11:10pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/5 "2023-02-11T23:10:09Z")

</div>

I did some more exploring today and still having issues unfortunately.

I downloaded the sample app keyed to the “Default App” and after clicking the login button I get:

“Oops… Service not found: {yourApiIdentifier}”

Is something may be wrong with my Auth0 settings?

---

<div class="post-metadata">

**Author:** ![adamdenais](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adamdenais/32/44551_2.png) [@adamdenais](https://community.auth0.com/u/adamdenais)\
**Post date:** [February 13, 2023, 2:17pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/6 "2023-02-13T14:17:48Z")

</div>

I don’t claim to know what the issue was but I solved my problem.

I changed  
`authorizationParams={{ redirect_uri: window.location.origin }}`  
to  
`redirectUri={window.location.origin}`  
and it worked.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 13, 2023, 9:13pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/7 "2023-02-13T21:13:25Z")

</div>

Hi there @adamdenais!

Sorry for the delayed response, but happy to hear you were able to get this sorted! Out of curiosity and for the benefit of future community members, which version of `auth0-react` are you using? There are some differences to how authorize params are handled between `v1` → `v2`.

Cheers!

---

<div class="post-metadata">

**Author:** ![adamdenais](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adamdenais/32/44551_2.png) [@adamdenais](https://community.auth0.com/u/adamdenais)\
**Post date:** [February 13, 2023, 11:00pm UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/8 "2023-02-13T23:00:09Z")

</div>

I was on Auth0 v1.

I thought I ran an update to Auth0 v2 within my terminal but I guess not.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 14, 2023, 12:02am UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/9 "2023-02-14T00:02:50Z")

</div>

> [@adamdenais](#):
>
> I was on Auth0 v1.

Gotcha, thanks for confirming! That makes sense then as `authorizationParams` was introduced in v2:

> <https://github.com/auth0/auth0-react/blob/main/MIGRATION_GUIDE.md#introduction-of-authorizationparams>

---

<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 28, 2023, 12:03am UTC](https://community.auth0.com/t/stuggling-with-unable-to-issue-redirect-for-oauth-2-0-transaction/100230/10 "2023-02-28T00:03:02Z")

</div>

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