Page 1 of 1

oauth

Posted: Fri May 02, 2014 7:28 pm
by Jerry Blanchard

Good Morning,

So I have setup a pretty robust create user/user management for my app and I have configured oauth via the tutorial and both are working. So how do I tie the results from oauth into my login? I assume that I need to use the results to compare with emails in my user database, but how is this done?

Thanks,

Jerry


oauth

Posted: Sat May 03, 2014 4:35 am
by Illya Stepanov

Hi Jerry,

Our developers will look at this and someone will get back with reply in the nearest time.


oauth

Posted: Sun May 04, 2014 1:39 pm
by Serhii Kulibaba

oauth

Posted: Mon May 05, 2014 1:28 am
by Jerry Blanchard

Sergiy,

Thanks for the relay over the weekend. I have completed the tutorial before and I have that aspect of my app working. my question is what do I do next. I have already build a robust authentication module for my app (new account creation, user profile...) which is working great, my question is: How to I use the results from the Google or Facebook oauth return to compare with my user collection for access. I would guess that oauth would return a value like email that I can use, but I can not find any documentation of what those values are named. I think I can figure out how to do the comparison once I know what oauth returns.

Thanks.

Jerry


oauth

Posted: Mon May 05, 2014 10:28 am
by Evgene Karachevtsev

Hello Jerry,

Please look at this part of the tutorial: http://docs.appery.io/tutorials/conne...
Here is described how to retrieve email info.


oauth

Posted: Mon May 05, 2014 5:10 pm
by Jerry Blanchard

OK, I see it now, thanks


oauth

Posted: Tue May 06, 2014 6:31 pm
by Jerry Blanchard

OK, I now I have been all over this and as far as I can tell, the FascbookREST does nothing more than allow for the alert command to show the information. What I would like to know is once the FacebookREST is successful, how do I pass the credentials to my database with my users to test if they are a valid user? I'm sure I can capture the results and invoke a logon service, but I will not have a password to pass along with the email address (I'm glad I choose email address as username)? This information is NOT in the tutorial. Is it possible? Please don't ask me to look at the Tutorial again, just an answer would be great.


oauth

Posted: Wed May 07, 2014 10:59 pm
by Yurii Orishchuk

Hi Jerry.

We have discussed similar issue here: https://getsatisfaction.com/apperyio/...

Unfortunatly you can not login to appery.io DB without password.

I can suggest you following solution:

1 Add to your users system colletion email column.

2 Login in oAuth with some email and recieve an oAuth token.(this part you have already done)

3 Search for the user with email from step 2. See details here: http://docs.appery.io/documentation/b...

4 If user not exists in users collection - you signup this user in appery.io db. As password you should use some predefined, only server code known strong string. See details here: http://docs.appery.io/documentation/b...

5 If user exists in the users collection. Verify the oAuth token if needed and login with password from step 4. See details here: http://docs.appery.io/documentation/b...

Note for steps 3, 4 and 5 you have to use server code. See more about it here: http://docs.appery.io/documentation/b...

That's all.

Regards.


oauth

Posted: Thu May 08, 2014 2:16 am
by Jerry Blanchard

Thanks, I will give it a try