问题
我正在尝试实现Microsoft登录到我的应用程序中。我正在使用文档中描述的Expo oAuth插件(https://docs.tag.dev/guides/authentication/#azure)。
我可以在android和ios上构建和运行良好但是当我尝试提交ios构建时,我收到一个错误
Waiting for submission to complete. You can press Ctrl+C to exit.
✖ Something went wrong when submitting your app to Apple App Store Connect.
We couldn't figure out what went wrong. See logs to learn more.
[logs] Starting the submit process
[logs] Downloading archive
[logs] Preparing artifact
[logs] Verifying archive
[logs] Creating ascApiJsonKey.json file with ASC credentials
[logs] Submitting iOS app to TestFlight...
[logs] Submitting the app with fastlane pilot
[logs] -------------------
[logs] --- Step: pilot ---
[logs] -------------------
[logs] Creating authorization token for App Store Connect API
[logs] Ready to upload new build to TestFlight (App: 911779924)...
[logs] Going to upload updated app to App Store Connect
[logs] This might take a few minutes. Please don't interrupt the script.
[logs] [altool] 2023-11-03 02:55:19.639 *** Error: Asset validation failed The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6) (90155)
[logs] [altool] {
[logs]
[logs] [altool] NSLocalizedDescription = "Asset validation failed";
[logs]
[logs] [altool] NSLocalizedFailureReason = "The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6)";
[logs]
[logs] [altool] "original_server_error" = {
[logs]
[logs] [altool] code = "STATE_ERROR.VALIDATION_ERROR.90155";
[logs]
[logs] [altool] detail = "The following URL schemes found in your app are disallowed: [msauth]";
[logs]
[logs] [altool] id = "c3d7df49-5de2-4684-a732-f23c1b7638a6";
[logs]
[logs] [altool] status = 409;
[logs]
[logs] [altool] title = "Asset validation failed";
[logs]
[logs] [altool] };
[logs]
[logs] [altool] }
[logs]
[logs] Application Loader output above ^
[logs] ERROR: Asset validation failed (90155) The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6)
[logs] Error uploading '/var/folders/8m/cfpqfjyx37xd0tlkyxt9flph0000gn/T/e60cec55-13b3-4757-8501-eee3697d70e7.ipa'.
[logs] Asset validation failed The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6) (90155)
[logs] The call to the altool completed with a non-zero exit status: 1. This indicates a failure.
[logs] Could not download/upload from App Store Connect!
[logs] [!] Error uploading ipa file:
[logs] [Application Loader Error Output]: ERROR: Asset validation failed (90155) The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6)
[logs] [Application Loader Error Output]: Error uploading '/var/folders/8m/cfpqfjyx37xd0tlkyxt9flph0000gn/T/e60cec55-13b3-4757-8501-eee3697d70e7.ipa'.
[logs] [Application Loader Error Output]: Asset validation failed The following URL schemes found in your app are disallowed: [msauth] (ID: c3d7df49-5de2-4684-a732-f23c1b7638a6) (90155)
[logs] [Application Loader Error Output]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure.
[logs] Fastlane pilot failed
[logs] Failed to submit the app
字符串
我意识到msauth是android方案,但我需要它来让azure登录在android上工作。没有这个方案,登录不会重定向回我的应用程序。
我的配置
在app.json中,我有如下定义的方案。我已经编辑了我的fb ID。
第一个月
我的重定向URL对象是这样构造的:
const redirectObject = {
scheme : Platform.OS === 'ios' ? "msauth.be.cpa.taxistop.Carpool" : "msauth",
path : Platform.OS === 'ios' ? "auth" : "be.taxistop.carpool/[HASH]",
useProxy: USE_PROXY,
};
型
我根据我在Azure门户中的信息构建了上面的对象:
的数据
我尝试过的事
我已经尝试删除'msauth'方案后,我可以成功地提交到testflight,但我没有在android应用程序重定向。
接下来,我尝试通过app.json将scheme添加到plist中,如下所示:https://forums.expo.dev/t/url-scheme-not-recognized-ios/69701
"infoPlist": {
"CFBundleURLTypes": [
{
"CFBundleTypeRole": "Editor",
"CFBundleURLSchemes": ["msauth"]
}
],
"LSApplicationQueriesSchemes": ["msauth"]
}
型
不幸的是,这也没有奏效。
接下来,我“弹出”我的应用程序(预构建),直接在xcode中将方案添加到plist中(在mac上),我能够成功地构建应用程序并进行存档,但当提交应用程序进行testflight时,我再次收到了完全相同的错误消息。
我完全卡住了,在这一点上的想法,所以我希望有人在这里可以帮助我在正确的方向.
1条答案
按热度按时间i7uaboj41#
在Azure广告中注册应用程序时,您将找到iOS所需的返回URL。它将类似于
msauth.<bundleid>
。这是您需要添加到
CFBundleURlSchemes
的值。此键声明您的应用支持的URL方案。通过在此处添加
msauth
,您的应用试图劫持Microsoft Authenticator URL方案。在
LSApplicationQueriesSchemes
中包含msauth
是可以的,因为这可以让您的应用检查是否安装了Microsoft Authenticator应用。你得到的消息很有趣,因为官方上,没有“注册”的网址方案;这就是为什么通用链接是首选。在这种情况下,似乎苹果已经决定,有一个真实的安全风险的应用程序试图劫持的身份验证,并已添加了某种黑名单。