Firebase $authWithOAuthRedirect doesn't call $onAuth without page refresh

后端 未结 2 1076
清酒与你
清酒与你 2021-01-19 05:35

I have a simple Firebase Facebook OAuth login set like below by following the official tutorial for the Ionic Firebase Facebook login.

The problem is that once I cli

相关标签:
2条回答
  • 2021-01-19 06:11

    Posted on the github issues, but will reply here as well.

    This only happens in the browser using $authWithOAuthRedirect. The example was intended for cordova apps, so this really shouldn't be an issue.

    But if you really need it, you could just skip the redirect and use a popup.

        Auth.$authWithOAuthPopup(authMethod).then(function(authData) {
          console.dir(authData);
        });
    
    0 讨论(0)
  • 2021-01-19 06:28

    This was a bug that has been fixed in the latest Firebase JS client release (2.3.0). You can now use $authWithOAuthRedirect and the $onAuth callback will be triggered when you navigate back to the page.

    0 讨论(0)
提交回复
热议问题