Janrain facebook login in web2py

256 Views Asked by At

I am using janrain facebook login to login in web2py. Facebook is returning profile picture, age and other public profile details. However, I am not able to access those details. Where are those details stored?

1

There are 1 best solutions below

0
PBICS On

It really depends on which Janrain product you are using. If you are using Janrain Social Login only then the Facebook information is returned as part of the authentication payload. The data is normalized into the POCO format and returned as JSON data. You need to request the extended data to get the full payload.

I'm not familiar with web2py so I can't give any guidance on settings. There is a Test Tool that you can access once you are logged into the Janrain Dashboard. The Test Tool lets you see the data that is returned from the Social Login widget. You can typically access this tool with a URL similar to this:

https://rpxnow.com/relying_parties/NAME_OF_YOUR_WIDGET/test

If you are using Janrain's Registration product the Social Login Widget becomes part of the Registration sign-in process. Instead of returning the normalized POCO payload the data is sent to the Janrain Registration server where it is stored in the Registration database in the "Profiles" plural. As a developer, you would typically use the oAuth token that is returned from the Registration server to make an "entity" call to the API and retrieve the details you need from the database. The Registration system can also be configured to return specific fields along with the oAuth token when you are using the Registration widget. However, this customization does require working with your deployment contact at Janrain.

You may want to review the API documentation for Janrain's Social Login and Registration products starting here: http://developers.janrain.com/rest-api/

There is also some Python libraries available for interacting with the Janrain Registration system (formerly called "Capture"). They can be found here: https://github.com/janrain/janrain-python-api