# Callback URL After Login

**URL:** <https://community.auth0.com/t/callback-url-after-login/106768>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [May 11, 2023, 6:49pm UTC](https://community.auth0.com/t/callback-url-after-login/106768 "2023-05-11T18:49:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.cassidy](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@justin.cassidy](https://community.auth0.com/u/justin.cassidy)\
**Post date:** [May 11, 2023, 6:49pm UTC](https://community.auth0.com/t/callback-url-after-login/106768/1 "2023-05-11T18:49:21Z")

</div>

Good afternoon, I was hoping to get some guidance on an issue I’m experiencing.

I’ve got a React SPA I’ve published, and I’m not having any luck with the callback URI’s in regards to logging in with Auth0.

My SPA is published under an umbrella domain site like the following:

[https://parentsite/myReactSPA/](https://parentsite/myReactSPA/)

I’ve added the Callback URL: [https://parentsite/myReactSPA/](https://parentsite/myReactSPA/) and that doesn’t work, so I added just [https://parentsite/](https://parentsite/) and Auth0 attempts to work with that, but since that’s not the actual site it doesn’t work.

I also tried passing in the URL I want it to redirect to in the loginWithRedirect options as follows: `onClick={() => loginWithRedirect(openUrl: 'https://parentsite/myReactSPA/'})}` but that doesn’t seem to work either. That causes an error in one of the Auth0 files. I get an error stating “TypeError r is not a function” in auth0-spa-js.production.esm.js

Is it not possible to have Auth0 go back to [https://parentsite/myReactSPA](https://parentsite/myReactSPA) via the loginWithRedirect call?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 12, 2023, 11:58pm UTC](https://community.auth0.com/t/callback-url-after-login/106768/3 "2023-05-12T23:58:50Z")

</div>

Hi @justin.cassidy,

Welcome to the Auth0 Community!

Firstly, for the Callback URL to work, please make sure to:

- Add the URL to the Allowed Callback URLs list in your application settings ([Auth0 Dashboard \> Applications \> Applications \> Your Application \> Allowed Callback URLs](https://manage.auth0.com/#/applications)).
- Make sure the `redirect_uri` query parameter points to a URL that is from the list of Allowed Callback URLs.

> [@justin.cassidy](#):
>
> I also tried passing in the URL I want it to redirect to in the loginWithRedirect options as follows: `onClick={() => loginWithRedirect(openUrl: 'https://parentsite/myReactSPA/'})}` but that doesn’t seem to work either.

The URL should be passed into the `redirect_uri` property inside the [authorizationParams object](https://auth0.github.io/auth0-react/interfaces/AuthorizationParams.html#redirect_uri). See below:

```auto
onClick={() => loginWithRedirect(authorizationParams: { redirect_uri:'https://parentsite/myReactSPA/'})}

```

Could you please give this a try and let me know how this works for you?

Thanks,  
Rueben

---

<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:** [May 26, 2023, 11:59pm UTC](https://community.auth0.com/t/callback-url-after-login/106768/4 "2023-05-26T23:59:03Z")

</div>

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