# Final redirect not working - Decap + Auth0 + Github

**URL:** <https://community.auth0.com/t/final-redirect-not-working-decap-auth0-github/183509>\
**Category:** Get Help\
**Tags:** authentication-sessions, sessions\
**Created:** [March 7, 2025, 10:43am UTC](https://community.auth0.com/t/final-redirect-not-working-decap-auth0-github/183509 "2025-03-07T10:43:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gg81](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gg81/32/73499_2.png) [@gg81](https://community.auth0.com/u/gg81)\
**Post date:** [March 7, 2025, 10:43am UTC](https://community.auth0.com/t/final-redirect-not-working-decap-auth0-github/183509/1 "2025-03-07T10:43:07Z")

</div>

I am using Decap, and need Github authentication, which I am trying to get through Auth0. Everything is fine until the final redirect of Auth0 back to my application. If I set the redirect\_uri to be deliberately incorrect (i.e. not on my Auth0 whitelist), it fails immediately, so I am as sure as I can be that the rediect\_uri is set correctly.

So the stages so far are:

- User clicks the login button on my Decap application
- Decap redirects to Auth0 to login
- Auth0 displays a welcome message with a “Continue with Github” link, which the user clicks
- User is redirected to Github, which allows the user to log in, and then redirects back to Auth0 (at /login/callback with `code` and `state` URL parameters
- Auth0 sees this, and redirects it with a 302 to /authorize/resume?state=… where the state is different from the one Github returned
- It is this final redirect which fails. It appears in the logs as two consecutive failed logins within 15ms of one another, both with the description “Unable to issue redirect for OAuth 2.0 transaction”. The first has the “User’s Name” field set to my email address, the second has it set to N/A.

Can anyone help with fixing this? Thanks 🙂

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [March 10, 2025, 7:45pm UTC](https://community.auth0.com/t/final-redirect-not-working-decap-auth0-github/183509/3 "2025-03-10T19:45:49Z")

</div>

Hi @gg81,

Welcome to the Auth0 Community and thanks for posting.

First please make sure that the callback URL is set correctly within your application in Auth0, such as:

> [https://YOUR-APP-NAME/callback](https://YOUR-APP-NAME/callback)

There could be several reasons as of why you are receiving this error message, but you can take a look at your `/authorize` request to see if it looks similar to the example mentioned in our documentation about [social logins](https://auth0.com/docs/api/authentication#login), including the state parameter.

Otherwise if you are using a one of our SDK’s most probably you should include the redirect URI as described here :

```auto
authorizationParams: {
        redirect_uri: window.location.origin
      }

```

You can check our **RedirectLoginOptions** from our [SPA SDK](https://auth0.github.io/auth0-spa-js/interfaces/RedirectLoginOptions.html).

It would definitely help having a look over our [Redirect Users](https://auth0.com/docs/authenticate/login/redirect-users-after-login#redirect-users-to-callback-urls-on-the-allowlist) documentation.

Also a possible fix could also be by gradually implementing one of [quickstarts](https://auth0.com/docs/quickstarts)

I hope this helps, and if you have additional concerns feel free to ask.  
Thanks,  
Remus

---

<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:** [March 24, 2025, 7:46pm UTC](https://community.auth0.com/t/final-redirect-not-working-decap-auth0-github/183509/4 "2025-03-24T19:46:01Z")

</div>

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