Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

login to appery DB with facebook credentials

Hi,
I have a facebook login service which works and returns user id and last name as requested.

So I am trying to login to appery DB using facebook "id" as name and "last name" as pass.

I set it up and on success of facebook,

invoke appery login and this works if user is already in appery DB and js navigation to profile screen follows.

If it a new user opens the app, facebook works as expected and it throws the error on appery login which is OK cause user is not registered,

So I have the appery signup service set to run on error but it doesnt invoke the service being called after the error of appery login service

Is there a good way to implement this?

Here is a screenshot so you can see the setup.
All services FB, appery login and signup services all run fine as stand alone services

Thanks

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

login to appery DB with facebook credentials

Hello Michael,

Please follow this tutorial:
https://devcenter.appery.io/tutorials...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

login to appery DB with facebook credentials

Sergily,
that doesnt contain any info regarding loggin to appery DB after FB login as I explained above.

Maybe I didnt explain clearly

FB login is sorted it runs fine.

Im trying to do a secret login or signup to appery DB on success or error of FB Me service using facebook returned user credentials

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

login to appery DB with facebook credentials

I understood. You should read user's name and sign it up to appery db. User's email you can use as password for it's registration. https://devcenter.appery.io/documenta...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

login to appery DB with facebook credentials

the signup and login services are already working as expected

I am tring to run these services on success and error events of the working FB login

So on success of FB login I run sign up service
All works fine if this is a new user.

If its a user who is already registered to appery DB it will throw an error user already exists want to run appery login service on this error

Its already setup as per screenshot above but when the error is thrown the login service doesnt fire

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

login to appery DB with facebook credentials

You should check the error message, and invoke login service only if it is "user already exists". Please add JS that invokes alerts on error and success events to see their order of execution.

Return to “Issues”