Ionic Auth - Custom Authentication and Facebook Login for existing users in database


#1

I have an existing webapp with database of users, I want these users to be able to login to an ionic app using their existing Email/Password or by using a Facebook Login button.

I can log users in to the ionic app using the ‘custom authentication’ option which checks user credentials on my server then goes back to ionic and then to the ionic app. This works fine.

Does anyone know how to use Ionic Auth with a Facebook login so that existing users in my database can click on the Facebook login button in the ionic app and then go through the authorization processes, get checked in my serverside code and then be created in Ionic Auth as a user?


#2

Try this:


#3

Thanks for that video, that shows how to setup the Ionic Auth Facebook integration well.

My issue is what happens if you already have existing users who log in to your web app using a Facebook Login (and are stored in a database), and you want those same users to also be able to use a Facebook Login to log in my Ionic app?

One possible solution I’ve thought of is to:

use Ionic Auth - Facebook Authentication, then when the user has logged in to my ionic app and gone through the Facebook Auth stuff, been created in Ionic.io as an Ionic User…

I then check to see if this user is an existing user in my database of users by calling a web service and supplying some JSON object containing the user’s Facebook information.

I then go back to my ionic app and say whether this is a existing user or not.