How to implement Log in with Facebook and Google + in an Ionic App

I am developing an application using ionic which needs a functionality of login via Facebook and Google +.
But unfortunately ngCordova does not provide any plugin to implement Facebook and Google + login via the native app. Can anyone help me achieving that.?

No idea about Google+

How to implement it with ionic. ng-cordova conatins some code for this. But i really donot know how to get it done. Do you have any idea?

ngCordova only have the social sharing plugin, do you want to Login or just share?

I want to log in using the fb app. If you dive into the ng-cordova.js you can find facebookConnectPlugin with the provider $cordovaFacebookConnectProvider. But I really cant understand how to use them. Can you please have a look at the ng-cordova.js? Please… Please…

OMG ng-Cordova have updated the DOCS in their website. … Let me try this…

1 Like

I’m trying to login with google + this way :

1 Like

Hi @ssswagatss,

I recently added Oauth support to the ngCordova plugin. You can find documentation on it here:

After registering your application with Google and Facebook you can include your application key in your app. Oauth will initiate a browser login flow and have the user sign in using those services.

Let me know if you plan to go this route and have further questions.


1 Like

But the plugin did not work for me. Can you please describe in detail how it went for you?

Hello @siddhartha,

Finally the plugin didn’t work for me too :confused:

What errors are you stuck up with?
Can you please let me know.

I get “Error: User Cancelled” error, when I try to login with Google+

I deleted code for google+ connect and turn the project without this feature. I don’t remember the error, sorry …

Can you try this:

and please let me know how does this go

The problew with your plugin is that the user will have every time to fill in username and password (of the social account). This cancels the advantage of using social login

Not true. If you store the access token, you won’t need to login every time.

Thanks for your reply. I’ll do some more tests.

Hi, these posts will guide you on how to add Facebook and Google+ Native Logins to your Ionic apps:

1 Like

With ngCordova-OAuth, If you store the access_token, users still have to type password every hour. Unless it’s a banking app, I think its really annoying for the user.

1 Like

Its about to be deprecate you might see warning while logging in for Google.

hi @ssswagatss

here i mention steps for google login and google app setup (google developer console account)

**Ionic 1 + google login + Android **
Ionic 1 + google login + IOS

You can find documentation and demo code on it here