Crosswalk webview does not work with accounts-google login


I manually installed crosswalk webview (11) to meteor project.

However after that the login functionality is partially broken. The logged in cookie set by inappbrowser is not available to the crosswalk webview, thus logged in user is not able to access google resources, he/she should be able to access.


Hi, I fixed this issue (whew! finally) by
updating the meteor oauth package to work using redirect (even though the oauth still uses hardcoded loginStyle popup).


  1. Update the asset end_of_popup_response.html in oauth package to conditionally redirect to http://meteor.local/login?oauthCredentials={secret:,token:}
    (if isCordova)

  2. Update the login.js on rendered function to then call

    methodArguments: [{
    oauth: {
    credentialToken: data.oauthCredentials.credentialToken,
    credentialSecret: data.oauthCredentials.credentialSecret
    userCallback: callback && function (err) {

    <script type="text/javascript">
        function storeAndClose() {
            var credentialString= "";
            var config = JSON.parse(document.getElementById("config").innerHTML);
            console.log('store and close');
            if (config.setCredentialToken) {
                var credentialToken = config.credentialToken;
                var credentialSecret = config.credentialSecret;
                if (config.isCordova) {
                    console.log('isCordova -stringify');
                    credentialString = JSON.stringify({
                        credentialToken: credentialToken,
                        credentialSecret: credentialSecret
                    window.location.hash = credentialString;
                if (window.opener && window.opener.Package &&
                        window.opener.Package.oauth) {
                    console.log('all well-cordova in app browser in place');
                            credentialToken, credentialSecret);
                } else {
                    try {
                        console.log('store in sessionsstorage');
                        localStorage[config.storagePrefix + credentialToken] = credentialSecret;
                        if (config.isCordova) {
                            console.log('This is cordova... assuming android and redirecting ');
                            window.location.href = "http://meteor.local/login?oauthCredentials="+encodeURIComponent(credentialString);
                    } catch (err) {
                        // We can't do much else, but at least close the popup instead
                        // of having it hang around on a blank page.
            if (!config.isCordova) {
                document.getElementById("completedText").style.display = "block";
            else {
                console.log('This is cordova... assuming android and redirecting 2');
                window.location.href = 'http://meteor.local/login?oauthCredentials='+encodeURIComponent(credentialString);
<body onload="storeAndClose()">
<p id="completedText" style="display:none;">
    Login completed. <a href="#" onclick="window.close()">
    Click here</a> to close this window.
<div id="config" style="display:none;">##CONFIG##</div>

Issue with custom Oauth Popup on Cordova