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

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.

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. 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!

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

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

Thanks for following up @davidsidlinger!

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

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:

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!

1 Like

That’s great news @davidsidlinger thanks for confirming! :white_check_mark: :rocket:

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