科尔多瓦ios firebase登录

时间:2020-08-16 03:10:23

标签: ios firebase cordova google-login

cordova-版本10.0.0

我的插件列表

-MacBookPro:ios ahsol$ cordova plugin ls
com.cordova.plugins.cookiemaster 1.0.0 "CookieMaster"
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-backbutton 0.3.0 "Backbutton"
cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
cordova-plugin-buildinfo 4.0.0 "BuildInfo"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-customurlscheme 5.0.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file-selector 1.0.0 "File Selector"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-gallery-refresh 1.0.55 "GalleryRefresh"
cordova-plugin-htj-kakaotalk 1.0.0 "KakaoTalk"
cordova-plugin-in-app-youtube 1.0.0 "Cordova Plugin in app YouTube"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-ionic-webview 2.5.3 "cordova-plugin-ionic-webview"
cordova-plugin-media-capture 3.0.2 "Capture"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-preview-any-file 0.1.4 "PreviewAnyFile"
cordova-plugin-screen-orientation 3.0.1 "Screen Orientation"
cordova-plugin-second-webview 2.11.4 "Cordova Second Webview"
cordova-plugin-spinner 1.1.0 "Spinner Plugin"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-video-thumbnail 2.0.1 "Video Thumbnail"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
es6-promise-plugin 4.2.2 "Promise"
jaeger.Html5Video 1.2.2 "Html5Video"
org.apache.cordova.plugin.cache 1.0.5 "Clear Cache"
phonegap-plugin-mobile-accessibility 1.0.5-dev "Mobile Accessibility"

问题是Google登录窗口有问题。 当我使用信息登录时, 这个问题已传递到应用程序的初始页面。

这是index.html

        firebase.auth().signInWithRedirect(provider).then(function() {
console.log("test 1");
            return firebase.auth().getRedirectResult();
        }).then(function(result) {
console.log("test 2");
            var token = result.credential.accessToken;
            var user = result.user;
            var Email = user.email;
            var Id = user.uid;
            var NickName = user.displayName;
            var Type = 3;

            LoginFormSetAjax(Id, NickName, Email, Type);
        }).catch(function(error) {
            var errorCode = error.code;
            var errorMessage = error.message;
            console.log("TEST ERRORCODE : "+error.code+" ERRORMESSAGE : "+error.message);
        });

代码中间的console.log函数根本没有运行。

我认为我们应该返回登录屏幕并运行其余代码。 当您单击Google登录按钮并返回到应用程序时,似乎该应用程序正在重新运行,而不是在您单击Google登录名之前不在屏幕上运行。

在这种情况下 错误代码或问题元素不会记录在日志中。

点击登录屏幕后, 当出现Google登录窗口时,输入信息,然后按登录按钮,我想知道该应用程序如何返回上一个屏幕而不是重新运行。

firebase动态链接 网址前缀:goi.page.link 名称:goinew 网址:https://goi.page.link/8??F

.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en_US</string>
    <key>CFBundleDisplayName</key>
    <string>mangoi</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>???.???.goi</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>...</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>goi.page.link</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>goi-ee612.firebaseapp.com</string>
            </array>
        </dict>
    </array>
    <key>CFBundleVersion</key>
    <string>1.0.0</string>
    <key>KAKAO_APP_KEY</key>
    <string>...</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>kakao...</string>
        <string>kakaokompassauth</string>
        <string>storykompassauth</string>
        <string>kakaolink</string>
        <string>kakaotalk-4.5.0</string>
        <string>kakaostory-2.9.0</string>
        <string>youtube</string>
    </array>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>NSCameraUsageDescription</key>
    <string></string>
    <key>NSMainNibFile</key>
    <string></string>
    <key>NSMainNibFile~ipad</key>
    <string></string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string></string>
    <key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>CDVLaunchScreen</string>
    <key>UIRequiresFullScreen</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>

config.xml(项目)

    <universal-links>
        <host name="goi.page.link" scheme="https" />
        <host name="goi-ee612.firebaseapp.com" scheme="https">
            <path url="/__/auth/callback"/>
        </host>
    </universal-links>

0 个答案:

没有答案