Auth0 Home Blog Docs

Auth0 Cordova Quick Start Guide Android Problem

cordova
auth0
quick-start

#1

I was trying to use the Quick Start guide from Auth0 to set up authentication. As a start I ran the sample app from https://github.com/auth0-community/auth0-cordova-samples/tree/master/01-Login. And I can’t seem able to run it on android. I get an error
Error in Success callbackId: SafariViewController1859440610 : TypeError: Object.assign is not a function

Now I am following everything from the read me. As a test I ran the app on iPhone and it works as it should. Any ideas what should I do?
This is my plugins/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": {}
    }
    }

and 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>

The Domain in the Clients side is tsm-test.eu.auth0.com
Allowed Origins (CORS) is file://*

![alt text][1]


#2