Jerry Blanchard
Posts: 0
Joined: Thu Apr 10, 2014 5:10 am

oauth

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

oauth

Hi Jerry,

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

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

oauth

Jerry Blanchard
Posts: 0
Joined: Thu Apr 10, 2014 5:10 am

oauth

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

oauth

Hello Jerry,

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

Jerry Blanchard
Posts: 0
Joined: Thu Apr 10, 2014 5:10 am

oauth

OK, I see it now, thanks

Jerry Blanchard
Posts: 0
Joined: Thu Apr 10, 2014 5:10 am

oauth

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

oauth

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.

Jerry Blanchard
Posts: 0
Joined: Thu Apr 10, 2014 5:10 am

oauth

Thanks, I will give it a try

Return to “Issues”