【发布时间】:2017-10-10 11:00:09
【问题描述】:
因此,在我的科尔多瓦应用程序中集成 auth0 时遇到问题后,我决定运行官方提供的 sample app。但是在按照提供的说明进行操作后,我仍然无法使其工作。 我得到的错误是
Error in Success callbackId: SafariViewController1859440610 : TypeError: Object.assign is not a function
我在谷歌上找不到任何类似的问题,也不知道如何跟踪它。任何线索和帮助将不胜感激。 我的插件/fetch.json 看起来像这样
{
"cordova-plugin-inappbrowser": {
"source": {
"type": "registry",
"id": "cordova-plugin-inappbrowser@~1.3.0"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-whitelist": {
"source": {
"type": "registry",
"id": "cordova-plugin-whitelist@~1.2.1"
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-customurlscheme": {
"source": {
"type": "registry",
"id": "cordova-plugin-customurlscheme@^4.3.0"
},
"is_top_level": true,
"variables": {
"URL_SCHEME": "com.auth0.cordova.example",
"ANDROID_SCHEME": "com.auth0.cordova.example",
"ANDROID_HOST": "tsm-test.eu.auth0.com",
"ANDROID_PATHPREFIX": "/cordova/com.auth0.cordova.example/callback"
}
},
"cordova-plugin-safariviewcontroller": {
"source": {
"type": "registry",
"id": "cordova-plugin-safariviewcontroller"
},
"is_top_level": true,
"variables": {}
}
}
我的 config.xml 是:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.auth0.cordova.example" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Auth0 Example</name>
<description>
Login sample application that responds to the deviceready event and authenticates using Auth0
</description>
<author email="support@auth0.com" href="http://auth0.com">
Auth0 Team
</author>
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<platform name="android">
</platform>
<platform name="ios">
</platform>
<access origin="*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<preference name="AndroidLaunchMode" value="singleTask" />
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="~4.4.0" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.7.1" />
<plugin name="cordova-plugin-whitelist" spec="~1.3.2" />
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
<variable name="URL_SCHEME" value="com.auth0.cordova.example" />
<variable name="ANDROID_SCHEME" value="com.auth0.cordova.example" />
<variable name="ANDROID_HOST" value="tsm-test.eu.auth0.com" />
<variable name="ANDROID_PATHPREFIX" value="/cordova/com.auth0.cordova.example/callback" />
</plugin>
<plugin name="cordova-plugin-safariviewcontroller" spec="^1.4.7" />
</widget>
客户端的域是tsm-test.eu.auth0.com
【问题讨论】: