# Unable to issue redirect for OAuth 2.0 transaction - login

**URL:** <https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [February 15, 2023, 12:47pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560 "2023-02-15T12:47:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bethmccoy1110](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bethmccoy1110](https://community.auth0.com/u/bethmccoy1110)\
**Post date:** [February 15, 2023, 12:47pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/1 "2023-02-15T12:47:09Z")

</div>

I’ve just set up my login with Auth0 using Angular. I have created an application in Auth0 and connected it to a MongoDB database, I have tested this connection and it works fine.  
When I click ‘Login’ in my angular application, I am presented with the Auth0 login interface. I entered login details to match credentials in my MongoDB database and was asked by Auth0 if my application could access my details, which I granted. After this, an error page appeared stating ‘Unable to issue redirect for OAuth 2.0 transaction’.  
I’ve went back to look at my application settings and the allowed callback URLs, logged-out URLs and web origins have all been entered. I have no idea what could be causing this issue.

here is the context data:  
“connection”: “MongoDB”,  
“error”: {  
“message”: “Unable to issue redirect for OAuth 2.0 transaction”,  
“oauthError”: “server\_error”,  
“type”: “oauth-authorization”

---

<div class="post-metadata">

**Author:** ![abhii-bit](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abhii-bit/32/44752_2.png) [@abhii-bit](https://community.auth0.com/u/abhii-bit)\
**Post date:** [February 20, 2023, 7:32am UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/2 "2023-02-20T07:32:05Z")

</div>

Having the same issue

---

<div class="post-metadata">

**Author:** ![andrei.vasilev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrei.vasilev/32/33385_2.png) [@andrei.vasilev](https://community.auth0.com/u/andrei.vasilev)\
**Post date:** [February 20, 2023, 5:54pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/3 "2023-02-20T17:54:15Z")

</div>

Yes, same exact issue here except it is with the default auth0 database provider.

---

<div class="post-metadata">

**Author:** ![andrei.vasilev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrei.vasilev/32/33385_2.png) [@andrei.vasilev](https://community.auth0.com/u/andrei.vasilev)\
**Post date:** [February 20, 2023, 6:14pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/4 "2023-02-20T18:14:40Z")

</div>

Ok I figured it out. When configuring the auth0 client, you need to explicitly specify the redirect uri now. This wasn’t required in older versions. I’m not sure when they changed this. I just updated my client today to the newest version, which is why it broke for me.

```auto
 AuthModule.forRoot({
      ...
      authorizationParams: {
        redirect_uri: environment.redirectUri
      },
})

```

---

<div class="post-metadata">

**Author:** ![bethmccoy1110](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bethmccoy1110](https://community.auth0.com/u/bethmccoy1110)\
**Post date:** [February 20, 2023, 7:46pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/6 "2023-02-20T19:46:34Z")

</div>

> [@andrei.vasilev](#):
>
> ```auto
> AuthModule.forRoot({
> ...
> authorizationParams: {
> redirect_uri: environment.redirectUri
> },
> })
> 
> ```

Im unsure what to set as my environment. redirectURI.

I’m wanting it to redirect to [http://localhost:4200](http://localhost:4200)

---

<div class="post-metadata">

**Author:** ![andrei.vasilev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrei.vasilev/32/33385_2.png) [@andrei.vasilev](https://community.auth0.com/u/andrei.vasilev)\
**Post date:** [February 20, 2023, 7:56pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/7 "2023-02-20T19:56:15Z")

</div>

You can just set it directly to start

```auto
redirect_uri: 'http://localhost:4200'

```

However, it should eventually be set via an environment variable since your local vs production redirects are going to be different.

---

<div class="post-metadata">

**Author:** ![spoudel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/spoudel/32/51376_2.png) [@spoudel](https://community.auth0.com/u/spoudel)\
**Post date:** [February 20, 2023, 8:15pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/8 "2023-02-20T20:15:53Z")

</div>

> [@bethmccoy1110](#):
>
> d connected it to a MongoDB database,

Make sure that the redirect\_uri is spelled properly.

---

<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 21, 2023, 11:00am UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/9 "2023-02-21T11:00:46Z")

</div>

Hey there everyone!

Thanks for sharing that knowledge with the rest of community!

---

<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 22, 2023, 11:18am UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/10 "2023-02-22T11:18:27Z")

</div>


