capacitor-community / proposals

Plugin and platform requests ✋
75 stars 2 forks source link

FirebaseUI #66

Open ASomerN opened 4 years ago

ASomerN commented 4 years ago

Plugin Request

Name: FirebaseUI Package: @capacitor-community/firebase-ui

Platform(s)

Web/Android/iOS

Description

Implementation of the plugin should allow authentication with supported firebase methods.

mesqueeb commented 3 years ago

Also related is #91 if that package is created first, it could be the dependency for the FirebaseUI

jirihajek commented 2 years ago

Not a full solution, but it might be useful for someone. I use this little hack to use firebaseui in capacitor:

btn = document.querySelector('[data-provider-id="facebook.com"');
if (btn)
  btn.addEventListener('click', this.onFacebookClick, { capture: true });
onFacebookClick = (e) => {
  signIn(async () => await FirebaseAuthentication.signInWithFacebook());
  e.preventDefault();
  e.stopPropagation();
}

This way firebaseui is used for the UI part, but login is handled natively (for Android build, web can be still fully handled by firebaseui).