# Unable to issue redirect for OAuth 2.0 transaction after upgrading to \`@auth0/angular@2.1.0\`

**URL:** <https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [April 4, 2023, 7:00pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124 "2023-04-04T19:00:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidsidlinger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidsidlinger/32/29751_2.png) [@davidsidlinger](https://community.auth0.com/u/davidsidlinger)\
**Post date:** [April 4, 2023, 7:00pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/1 "2023-04-04T19:00:28Z")

</div>

Hi!

I am in the process of upgrading the `@auth0/angular` dependency in our application. After upgrading, it appears to get through the first phases of authentication with both database and social providers. it fails on completion with “Unable to issue redirect for OAuth 2.0 transaction”.

I followed the upgrade guide and searched the forums to find likely causes. I have verified we’re sending `redirect_uri`, which seems to be the most frequent cause.

---

<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:** [April 5, 2023, 6:42pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/3 "2023-04-05T18:42:43Z")

</div>

Hey there @davidsidlinger welcome to the community!

Thanks for the detailed description of the issue you’re seeing - Are you able to verify you’re using `authorizationParams` correctly as outlined [here](https://github.com/auth0/auth0-angular/blob/master/MIGRATION_GUIDE.md#introduction-of-authorizationparams). The vast majority of issues I’ve seen since `v2` are due to the introduction of `authorizationParams`. Like you mentioned, this error is almost always related to the `redirect_uri`.

Keep us posted!

---

<div class="post-metadata">

**Author:** ![davidsidlinger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidsidlinger/32/29751_2.png) [@davidsidlinger](https://community.auth0.com/u/davidsidlinger)\
**Post date:** [April 5, 2023, 7:05pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/4 "2023-04-05T19:05:48Z")

</div>

Yep! I have modified our Auth0 module import like so:

```auto
        AuthModule.forRoot({
            cacheLocation: "localstorage",
            clientId: AG_OIDC_CLIENT_ID,
            domain: AG_OIDC_DOMAIN,
            httpInterceptor: {
                allowedList: [httpInterceptorPath],
            },
            useRefreshTokens: true,
            authorizationParams: {
                audience: AG_OIDC_AUDIENCE,
            },
        }),

```

---

<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:** [April 5, 2023, 7:25pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/5 "2023-04-05T19:25:57Z")

</div>

Thanks for following up @davidsidlinger!

Do you see the same issue if you add the `redirect_uri` to `authorizationParams` like so:

```auto
AuthModule.forRoot({
            cacheLocation: "localstorage",
            clientId: AG_OIDC_CLIENT_ID,
            domain: AG_OIDC_DOMAIN,
            httpInterceptor: {
                allowedList: [httpInterceptorPath],
            },
            useRefreshTokens: true,
            authorizationParams: {
                audience: AG_OIDC_AUDIENCE,
                redirect_uri:your_redirect_uri
            },
        }),

```

Here’s a similar topic/issue:

> [@Unable to issue redirect for OAuth 2.0 transaction - login](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-login/100560/4):
>
> 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. AuthModule.forRoot({ ... authorizationParams: { redirect\_uri: environment.redirectUri }, })

---

<div class="post-metadata">

**Author:** ![davidsidlinger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidsidlinger/32/29751_2.png) [@davidsidlinger](https://community.auth0.com/u/davidsidlinger)\
**Post date:** [April 5, 2023, 7:50pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/6 "2023-04-05T19:50:12Z")

</div>

~~I do see the same behavior. Whether it’s in the module resgistration or not, we are using the `AuthGuard` provided by the package, and it always explicitly sends the `redirect_uri` with the current URL.~~

I was able to get this straightened out. It was the `redirect_uri`. When I specified it, I was sending the incorrect value.

Thanks, @tyf!

---

<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:** [April 5, 2023, 9:02pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/7 "2023-04-05T21:02:19Z")

</div>

That’s great news @davidsidlinger thanks for confirming! ✅ 🚀

---

<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:** [April 19, 2023, 9:02pm UTC](https://community.auth0.com/t/unable-to-issue-redirect-for-oauth-2-0-transaction-after-upgrading-to-auth0-angular-2-1-0/104124/8 "2023-04-19T21:02:39Z")

</div>

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