cordova-plugin-oauth icon indicating copy to clipboard operation
cordova-plugin-oauth copied to clipboard

Firebase?

Open louisameline opened this issue 5 years ago • 6 comments

Hi, thanks for your work, looks nice! I just wanted your thoughts on an idea.

I'm using Google's Firebase, which seemlessly authenticates to a number of providers via a redirection (in Cordova). Works out of the box in the browser, but they have this guide for Cordova apps https://firebase.google.com/docs/auth/web/cordova

It requires these plugins:

cordova-plugin-buildinfo
cordova-universal-links-plugin-fix
cordova-plugin-browsertab
cordova-plugin-inappbrowser
cordova-plugin-customurlscheme

Unfortunately cordova-universal-links-plugin-fix and cordova-plugin-browsertab are not maintained and do not even work at all in the latest cordova release. Custom-URL-schemehas 113 open issues. I was looking for my options and here you are, with a lightweight plugin that looks like maybe it could do the work of all of them? With ZERO stars, what the hell ? I'll be your first one haha

So here I am, I opened this issue to ask where's the catch lol, could it indeed replace all of the above? Maybe the Firebase team themselves could look into this and build the bridge between Firebase and your plugin. It would get a ton of traction immediately.

What do you think? Thanks!

louisameline avatar Oct 25 '19 21:10 louisameline

@louisameline Hi - I'm the same case - were you able to make it work properly? How do you integrate with firebase? Sending the credential?

hcbelias avatar Oct 28 '20 20:10 hcbelias

Never tried this plugin, too risky, I just use Firebase Auth.

louisameline avatar Oct 28 '20 22:10 louisameline

Did you get it working with cordova? I have been trying to implement it and no luck, like you said the browsertab plugin no longer works. So, I assume it's just not going anywhere when I tap the button that otherwise starts the redirect flow.

murraybot avatar Aug 04 '21 20:08 murraybot

Firebase auth used to work fine until this:

https://github.com/firebase/firebase-js-sdk/issues/4256#issuecomment-891069486

Now do yourself a favor and don't try to use oauth for login in Cordova...

louisameline avatar Aug 04 '21 21:08 louisameline

Will I not be able to use any SSO or oauth type services? I was looking to okta but firebase seemed like a more convenient option. If I have the allow access setup for it in my config.xml the redirecting shouldn't be an issue right? Building my own authentication back end would be very time consuming.

murraybot avatar Aug 04 '21 22:08 murraybot

You can implement login/password authentication in no time with Firebase, but implementing signin with Facebook/Google/AppleId etc will take you weeks (litteraly, I've been there) AND is now buggy because webviews are now more limitative with cross-site interaction. It's been months and the Firebase team still has no clues on how to fix it.

louisameline avatar Aug 05 '21 07:08 louisameline