# Unable to use custom domain on native SwiftUI

**URL:** <https://community.auth0.com/t/unable-to-use-custom-domain-on-native-swiftui/187281>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [May 28, 2025, 12:21pm UTC](https://community.auth0.com/t/unable-to-use-custom-domain-on-native-swiftui/187281 "2025-05-28T12:21:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssantos](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ssantos/32/72961_2.png) [@ssantos](https://community.auth0.com/u/ssantos)\
**Post date:** [May 28, 2025, 12:21pm UTC](https://community.auth0.com/t/unable-to-use-custom-domain-on-native-swiftui/187281/1 "2025-05-28T12:21:03Z")

</div>

Hi!

I implemented basic login for default `Auth0` domain which works, but I’m struggling to get an `accessToken` that I can use for my custom api; whenever I set my custom domain on the callback urls or in `Auth0.plist`, I stop getting redirected to my app after logged. I double checked all the configuration is fine, so I’m guessing maybe I’m missing something obvious here.

Any tip pointing in the right direction would be much appreciated 🙂

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 28, 2025, 3:37pm UTC](https://community.auth0.com/t/unable-to-use-custom-domain-on-native-swiftui/187281/3 "2025-05-28T15:37:29Z")

</div>

Hi @ssantos

Welcome to the Auth0 Community!

Could you let me know if you pass in an audience when you initialize the `webAuth()` function and what audience are you passing in?

If the audience you pass in contains your custom domain, please try to remove the `.audience` line or use your generic Auth0 domain and let me know if that works.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![ssantos](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ssantos/32/72961_2.png) [@ssantos](https://community.auth0.com/u/ssantos)\
**Post date:** [May 28, 2025, 4:31pm UTC](https://community.auth0.com/t/unable-to-use-custom-domain-on-native-swiftui/187281/4 "2025-05-28T16:31:34Z")

</div>

Thank you Nik for your quick reply.

I tried my custom api id as the `audience` field, but finally seems to be a simulator issue (`iPhone 16 18.x` for the record); didn’t try in older simulators, but it works on real hardware.

Best.

S
