ngx-auth-firebaseui icon indicating copy to clipboard operation
ngx-auth-firebaseui copied to clipboard

Support for Cordova / Ionic?

Open gbarrionuevo opened this issue 7 years ago • 18 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X ] feature request

OS and Version?

Versions

Repro steps

The log given by the failure

Desired functionality

As title says, it's going to support cordova / ionic soon?

Mention any other details that might be useful

gbarrionuevo avatar May 31 '18 21:05 gbarrionuevo

cordova / ionic will be soon supported! However, I don't know whether if I should enhance this project or create a new one like ionic-auth-firebaseui ...

what do you think?

would you prefer to use exactly the same UI with material design in ionic ? or to the ionic UI components ?

AnthonyNahas avatar Jun 01 '18 07:06 AnthonyNahas

Glad to hear It, It would be more clearly to have an ionic-auth... Also id rather material but ir just my perspective, do you have an eta ? Is there a way to contribute or smth?

gbarrionuevo avatar Jun 01 '18 11:06 gbarrionuevo

Contributions are welcome! Ill ping you here when I am finished with the ionic project's setup!

AnthonyNahas avatar Jun 01 '18 18:06 AnthonyNahas

Awesome code and documentation. Have you added cordova yet?

tariqsherriff avatar Sep 13 '18 11:09 tariqsherriff

thanks @tariqsherriff

Few weeks ago I created a new repo for cordova and ionic but I am still busy other stuffs :(

Would you prefer a separated project for that to use the ionic components instead of material2 ?

AnthonyNahas avatar Sep 25 '18 15:09 AnthonyNahas

@AnthonyNahas

yes it'd be great if you could make a separate project using ionic components 💯! i wish i could help but i am a beginner :(

tariqsherriff avatar Sep 25 '18 15:09 tariqsherriff

@AnthonyNahas : do you have any update about this issue ?

Erim32 avatar Mar 13 '19 00:03 Erim32

Ionic version of this library is on my roadmap (like the boostrap version which is already released). However, I am facing too many issues with ionic v4! Here is the active repo of the ionic-auth-firebaseui (last commit few hours ago ;) )

I would maybe support first ionic v2-3 and later on v4

AnthonyNahas avatar Mar 13 '19 07:03 AnthonyNahas

Are you open to PR's on https://github.com/AnthonyNahas/ionic-auth-firebaseui for Ionic v4, not sure based on ur last response, regarding v2-3?

Apsistec avatar Apr 30 '19 09:04 Apsistec

v4

for v2-3 we cann create a separated branch...

I am facing the issue of linking the ionic module with my 3rd party library...

I will appreciate really the help of the community...

AnthonyNahas avatar May 04 '19 10:05 AnthonyNahas

Hi Anthony, what is the current status of ionic support? I was able to use your library (with minor modifications) in ionic capacitor environment (to the extent I am interested in :-)) so I am curious to know when the "official" support will come... Thank you in advance.

yetanotherspinner avatar Oct 28 '19 14:10 yetanotherspinner

I am aiming to make this live in 2020 <3

AnthonyNahas avatar Oct 31 '19 22:10 AnthonyNahas

+1 for this functionality!

magoarcano avatar Jan 15 '20 11:01 magoarcano

Actually is there any way to open the social provider in a modal inside an app?

Or is the current mechanism working on a ionic app with some tweak?

jackie-d avatar Apr 03 '20 17:04 jackie-d

Hi, just got in depth, and found that the most reason that cause incompatibility with Ionic projects is the impossibility to rely on the social logins via related providers as they got called by the

signInWithPopup method instead of the mobile supported signInWithRedirect method.

See auth-process service

Related discussion specifically for Ionic

It would not be so difficult to change the method signature from

public async signInWith(provider: AuthProvider, credentials?: ICredentials) {

to

public async signInWith(provider: AuthProvider, credentials?: ICredentials, withRedirect = false) {

and bind an additional parameter to ngx-auth-firebaseui-providers component like withRedirect .

I don't find any other big limitation to use this inside a ionic/cordova project, beside the additional styling needed as it's not using default components, but for me that's a basilar optimization, not a limitation.

Would you be open to consider a PR for that and to enable the use of this library on mobile too?

Jackie

jackie-d avatar Apr 04 '20 08:04 jackie-d

Hi

Is the Ionic 4/5 support in the works? I'm currently developing a app using Ionic. I guess I can use the current Angular Material supported library inside the Ionic project. But it'll be useful if the components have the look and feel similar to Ionic.

So, Looking forward. Thanks

mbaljeetsingh avatar Apr 13 '20 07:04 mbaljeetsingh

@jackie-d I was about to submit a pull request for that but apparently, there is already one here #581

vbourdeix avatar Oct 23 '20 08:10 vbourdeix

@AnthonyNahas I needed support for Ionic/Cordova for my own project, so have given the port a crack...

What I intended to be a quick port become a somewhat larger refactoring, partially because I had in mind that the ionic and Capacitor dependant features would be separately packaged (such that a material UI could be implemented alongside). And I also had to meet the requirements of my app. I also wanted to ensure that the auth-pages could be lazily loaded, so they sit in a separate module from core.

The end result is I have:

  • core: -Provides auth-process service (which build on the base from this package) plus the avatar component (potentially needed on every page). This provides common access to auth functions, plus other 'essential' firebase functions such as crashlytics, performance, ...
  • UI abstraction (/ionic): which wraps alerts, toasts etc. (such that I can use the ionic native implementations, but it would be possible to implement for material too)
  • Firebase provider abstraction (/capacitor): Facades the relevant Capacitor plugins and injects them to used instead of the default angularFire implementation within core. Required when running on a Capacitor device (as this is unsupported by angular/fire or firebase sdk).
  • Auth-pages module: The auth pages and components (based on yours). This is a separate and required only for login/logout/user-management. It can be lazily loaded to the '/auth' route.

If nothing-else, I would imagine this would inform a ionic/capacitor implementation, and may very well be the seed of it. Anyhoo enough pre-amble, the (currently very poorly documented) repo is here.

https://github.com/mcroker/ngx-firebase

mcroker avatar Mar 17 '21 10:03 mcroker