Correct callbackURI for Auth0 + Ionic + React Application in IOS?

Viewed 189

So I created an application using React + Ionic and am handling the authentication and authorization via Auth0. After building my app and opening it in XCODE, it works fine. But after logging in with auth0, it says invalid URL. But the auth0 works totally fine as a web app.

Does anyone know what the correct callbackURI should be? I have auth0 configurations below

Allowed Callback URLs

http://localhost:8100/dashboard/, http://10.0.2.2:8100/dashboard, http://localhost:8100/dashboard, http://localhost:8100/profile, http://127.0.0.1:8100/dashboard, com.sector9.nosfitness://sector9.us.auth0.com/capacitor/com.sector9.nosfitness/callback, capacitor://localhost/dashboard

Allowed Origins

capacitor://localhost, http://localhost

Error message when trying to login on xcode simulator enter image description here

1 Answers

You have to set the below setting in info.plist

    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>com.sector9.nosfitness</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.sector9.nosfitness</string>
            </array>
        </dict>
    </array>
Related