# \[Capacitor/React\] \[iOS\] Redirect fail after login

**URL:** <https://community.auth0.com/t/capacitor-react-ios-redirect-fail-after-login/104572>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-react\
**Created:** [April 12, 2023, 9:04pm UTC](https://community.auth0.com/t/capacitor-react-ios-redirect-fail-after-login/104572 "2023-04-12T21:04:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris29](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chris29/32/46273_2.png) [@chris29](https://community.auth0.com/u/chris29)\
**Post date:** [April 12, 2023, 9:04pm UTC](https://community.auth0.com/t/capacitor-react-ios-redirect-fail-after-login/104572/1 "2023-04-12T21:04:07Z")

</div>

Here is the quickstart I was following: [Auth0 Ionic & Capacitor (React) SDK Quickstarts: Login](https://auth0.com/docs/quickstart/native/ionic-react/01-login)

I’ve cloned [this](https://github.com/auth0-samples/auth0-ionic-samples) repository and it doesn’t really seem to work right out of the box. I’ve followed the instructions (modified auth.config.ts to utilize the correct app ID, added the callback URLs and Logout URLs to my application settings, added the allowed origins, modified the custom URL scheme in the Info tab which isn’t in the README) and running the app via the iOS simulator is not working. When I log in, the app does not redirect me anywhere, though it seems to be attempting to do so.

I’m seeing the following log in XCode:

```auto
TO JS {"url":"{redacted app ID}:\/\/{redacted domain}\/capacitor\/{redacted app ID}\/callback?
code=zAcaQU7_2FUrrjvvMzEwaa1j2tZaK4gJZHi64MCld2lnl&
state=Z2RMTXN5RXdzZEFPcW85Qnd1TkdKU0k1Vm4ydWlRM0JLZS1JOUVyUTl%2BNA%3D%3D

```

so it seems like the app is attempting to perform the redirect, but the app stays on the login page and the browser does not close. Once I manually close the browser and then click “Log in” again, it just shows a blank page in the webview.

Here is a screen recording: [Screen Recording 2023-04-12...](https://share.getcloudapp.com/ApuveA7O)

I filed a corresponding issue on the Github repo: [[React] [iOS] Redirect fail after login · Issue #538 · auth0-samples/auth0-ionic-samples · GitHub](https://github.com/auth0-samples/auth0-ionic-samples/issues/538)

---

<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:** [April 24, 2023, 9:01am UTC](https://community.auth0.com/t/capacitor-react-ios-redirect-fail-after-login/104572/2 "2023-04-24T09:01:40Z")

</div>

Thank you for filing in the issue. I’m gonna share it here in the response for better visibility and gonna ping repo maintainers in a few minutes. Thank you!

> <https://github.com/auth0-samples/auth0-ionic-samples/issues/538>
>
> I've cloned this repository and it doesn't really seem to work right out of the …box. I've followed the instructions (modified auth.config.ts to utilize the correct app ID, added the callback URLs and Logout URLs to my application settings, added the allowed origins, modified the custom URL scheme in the Info tab which isn't in the README) and running the app via the iOS simulator is not working. When I log in, the app does not redirect me anywhere. 
> 
> I'm seeing the following log:
> \`\`\`
> TO JS {"url":"{redacted app ID}:\\/\\/{redacted domain}\\/capacitor\\/{redacted app ID}\\/callback?
> code=zAcaQU7\_2FUrrjvvMzEwaa1j2tZaK4gJZHi64MCld2lnl&
> state=Z2RMTXN5RXdzZEFPcW85Qnd1TkdKU0k1Vm4ydWlRM0JLZS1JOUVyUTl%2BNA%3D%3D
> \`\`\`
> so it seems like the app is attempting to perform the redirect, but the app stays on the login page and the browser does not close. Once I manually close the browser and then click "Log in" again, it just shows a blank page in the webview.
> 
> Here is a screen recording: https://share.getcloudapp.com/ApuveA7O

It seems that Frederik laso responded there in the issue thread on GitHub

---

<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 8, 2023, 9:02am UTC](https://community.auth0.com/t/capacitor-react-ios-redirect-fail-after-login/104572/3 "2023-05-08T09:02:17Z")

</div>

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