Firebase Google Auth 无法在 Safari 上运行

use*_*093 5 javascript safari firebase firebase-authentication

我有一个功能:

function loginWithGoogle () {
        firebase.auth().signInWithRedirect(provider);
}


firebase.auth().getRedirectResult().then(function(result) {
      if (result.credential) {
        // This gives you a Google Access Token. You can use it to access the Google API.
        var token = result.credential.accessToken;
      }          
      var user = result.user; // The signed-in user info.
    }).catch(function(error) {
      // Handle Errors here.
      var errorCode = error.code;
      var errorMessage = error.message;
      var email = error.email; // The email of the user's account used.          
      var credential = error.credential; // The firebase.auth.AuthCredential type that was used.
  });
Run Code Online (Sandbox Code Playgroud)

当用户单击登录按钮时运行。然而,这似乎不适用于 Safari(使用移动模拟器和我的桌面)。代码在Chrome上运行正常。我还需要添加其他内容来确保支持 Safari 吗?谢谢!