# Heroku related Auth0 Problem: Unable to issue redirect for OAuth 2.0 transaction

**URL:** <https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [February 25, 2021, 6:41pm UTC](https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532 "2021-02-25T18:41:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rannick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rannick/32/24784_2.png) [@Rannick](https://community.auth0.com/u/Rannick)\
**Post date:** [February 25, 2021, 6:41pm UTC](https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532/1 "2021-02-25T18:41:07Z")

</div>

I am currently developing a Flask App that uses Auth0 for authentication.

Testing on my local machine everything works fine. I was able to login and logout with auth0.

Now I deployed the same Flask App to heroku, adjusted AUTH0\_CALLBACK\_URL, but it does not work anymore:

> ```
> oauth = OAuth(app)
> auth0 = oauth.register(
> 'auth0',
> client_id=AUTH0_CLIENT_ID,
> client_secret=AUTH0_CLIENT_SECRET,
> api_base_url=AUTH0_BASE_URL,
> access_token_url=AUTH0_BASE_URL + '/oauth/token',
> authorize_url=AUTH0_BASE_URL + '/authorize',
> client_kwargs={
> 'scope': 'openid profile email',
> },
> )
> 
> ```

> ```
> @app.route('/login', methods=['GET'])
> def login():
> #redirect to auth0
> return auth0.authorize_redirect(redirect_uri=AUTH0_CALLBACK_URL, audience=AUTH0_AUDIENCE)
> 
> ```

I can see the auth0 login page, but after login I always get the auth0 error page with the following error:  
“Unable to issue redirect for OAuth 2.0 transaction”

I tried a lot of things to fix it, but nothing seems to work. I also replaced the AUTH0\_CALLBACK\_URL with the url itself and tried to adjust the auth0 settings, but nothing works.

I am really clueless at the moment and hope someone has an idea what causes this problem.

Best regards,  
R

---

<div class="post-metadata">

**Author:** ![Rannick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rannick/32/24784_2.png) [@Rannick](https://community.auth0.com/u/Rannick)\
**Post date:** [February 26, 2021, 8:36am UTC](https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532/2 "2021-02-26T08:36:55Z")

</div>

Just fixed it. The problem is the procfile. The release part of the procfile led to fails in the latest deployments, therefore the adjusted AUTH0\_CALLBACK\_URL was not applied.

---

<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:** [February 26, 2021, 10:24am UTC](https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532/3 "2021-02-26T10:24:17Z")

</div>

Thanks for sharing that with the rest of community!

---

<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 13, 2021, 10:24am UTC](https://community.auth0.com/t/heroku-related-auth0-problem-unable-to-issue-redirect-for-oauth-2-0-transaction/58532/4 "2021-03-13T10:24:49Z")

</div>

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