Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Facebook/Twitter/LinkedIn login to Google App Engine project?

I've searched for solutions, but everything I can find seems mostly outdated.

We're using the Python API for GAE and creating login urls in the following manner:

users.create_login_url(continue_url, "Yahoo", "http://yahoo.com/"),

Which works fine for sites such as Google, Yahoo, Aol, Blogger, Flickr, etc... but we're aware that Facebook and Twitter don't work in this manner.

Can anyone show any examples of how to authenticate users on App Engine using Facebook, Twitter, and LinkedIn?

Thanks!

like image 555
Cuga Avatar asked Oct 11 '22 11:10

Cuga


2 Answers

First, one has to register their application on Facebook and get an Application ID. Details: Register here Facebook authentication overview

Then, I used the facebook python SDK, along with the facebook javascript api (which is the canonical way to do authentication with facebook). Here's a working example of authenticaion I used.

Direct link to the Facebook python SDK

Direct link to the Facebook Javascript SDK

like image 133
Cuga Avatar answered Oct 23 '22 11:10

Cuga


If the service you want to sign in with doesn't support OpenID, you need to do it the same way you would on any other service: Set up your own sessions library, handle logins in a site-specific manner, and keep track of signed in user sessions using the session library.

like image 22
Nick Johnson Avatar answered Oct 23 '22 10:10

Nick Johnson