AyogoHealth / cordova-plugin-oauth

Cordova plugin for performing OAuth login flows.
Apache License 2.0
24 stars 27 forks source link

Firebase? #5

Open louisameline opened 5 years ago

louisameline commented 5 years ago

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!

hcbelias commented 3 years ago

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

louisameline commented 3 years ago

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

murraybot commented 3 years ago

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.

louisameline commented 3 years ago

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...

murraybot commented 3 years ago

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.

louisameline commented 3 years ago

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.