# Platform-specific redirect\_url

**URL:** <https://community.auth0.com/t/platform-specific-redirect-url/94707>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, node-auth0\
**Created:** [November 18, 2022, 2:51pm UTC](https://community.auth0.com/t/platform-specific-redirect-url/94707 "2022-11-18T14:51:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donniekerr01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donniekerr01/32/39308_2.png) [@donniekerr01](https://community.auth0.com/u/donniekerr01)\
**Post date:** [November 18, 2022, 2:51pm UTC](https://community.auth0.com/t/platform-specific-redirect-url/94707/1 "2022-11-18T14:51:18Z")

</div>

Do I have to use app.use in main.js in a Vue 3 app? My issue is that I need to dynamically set the redirect\_url to a different one for iOS or web platform. I use Ionic’s getPlatforms to detect the platform, but that happens AFTER app.use already setup Auth0 in main.js. Therefore I cannot change the redirect. Is there a way to load the auth0 from outside of main.js AFTER I get the platform?

```auto
const app = createApp(App)
  .use(router)
  .use(pinia)
  .use(IonicVue)
  .use(
    createAuth0({
      domain: "XXX.us.auth0.com",
      client_id: "XXX",
      redirect_uri: "XXX"
    })
  )

```

---

<div class="post-metadata">

**Author:** ![donniekerr01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donniekerr01/32/39308_2.png) [@donniekerr01](https://community.auth0.com/u/donniekerr01)\
**Post date:** [November 29, 2022, 2:57am UTC](https://community.auth0.com/t/platform-specific-redirect-url/94707/3 "2022-11-29T02:57:19Z")

</div>

I solved it using Ionic Vue’s getPlatforms to automatically switch the redirect url between native ios and web  
redirect\_uri: platform == ‘ios’? “XXX.XXX.app://XXX.us.auth0.com/capacitor/XXX.XXX.app/callback”: window.location.origin

---

<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:** [December 13, 2022, 2:57am UTC](https://community.auth0.com/t/platform-specific-redirect-url/94707/4 "2022-12-13T02:57:21Z")

</div>

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