【问题标题】:Correct callbackURI for Auth0 + Ionic + React Application in IOS?IOS中Auth0 + Ionic + React应用程序的正确callbackURI?
【发布时间】:2022-04-01 19:48:44
【问题描述】:

所以我使用 React + Ionic 创建了一个应用程序,并通过 Auth0 处理身份验证和授权。构建我的应用程序并在 XCODE 中打开它后,它工作正常。但是使用 auth0 登录后,它说 URL 无效。但是 auth0 作为一个网络应用程序完全可以正常工作。

有谁知道正确的 callbackURI 应该是什么?我在下面有 auth0 配置

允许的回调 URL

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

允许的来源

capacitor://localhost, http://localhost

尝试在 xcode 模拟器上登录时出现错误消息

【问题讨论】:

    标签: ios reactjs xcode ionic-framework auth0


    【解决方案1】:

    您必须在 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>
    

    【讨论】:

      猜你喜欢
      • 2018-02-11
      • 1970-01-01
      • 1970-01-01
      • 2017-11-17
      • 2022-09-30
      • 1970-01-01
      • 2021-07-21
      • 2020-04-04
      • 1970-01-01
      相关资源
      最近更新 更多