Django facebook, twitter and google + authentication - python

I need to get facebook, google+ and twitter authentication for my django app. What module should I use? I am using Django 1.8 and I've checked a couple of them but which one is the best? Any suggestions will be appreciated.
Thanks in advance!

This is an approximation using the Django rest framework https://github.com/PhilipGarnero/django-rest-framework-social-oauth2. You should be familiarized with OAuth2 protocol (basically you use someone else's security to authenticate an user in you app). Also there is this library https://github.com/requests/requests-oauthlib, look at the documentation, it's pretty well explained and has examples with Tumblr, Facebook,etc. The lastone works with Python in general, no Django needed (just in case).

Go for python-social-auth. It is good and well documented. You can start from here for introduction.

Related

Authenticate a Django/Appengine project using Firebase

I currently have google and facebook authentication for my application. I would like to add firebase-auth as the backend for my Django/appengine backend. The tutorial i followed (https://cloud.google.com/appengine/docs/standard/python/authenticating-users-firebase-appengine) only show how to use it for a python Flask backend.
Does anyone know how to set up firebase in a Django backend that uses appengine?
You should follow the same logic mentioned in the tutorial that you indicated here. As per the documentation informs:
The sample app uses Flask because of its simplicity and ease of use, but the concepts and technologies explored are applicable regardless of which framework you use.
So, the concepts are the same for any framework, which should work for you using Django. Since there isn't a specific tutorial for the use of Django, I recommend you take a look at the below article, to better understand the integration of Firebase and Django, so you can implement it on your
Python Django with Google Firebase : Getting Started, Intro, Basic Configuration & Firebase Authentication #Part1
Let me know if the information helped you!

How can I add a facebook user login functionality

My python version is 3.4.3 and my django version is 1.9.6 . I tried many django facebook registrations apps but almost all the versions are outdated.
What I want is to allow users to login via facebook and check if their friends are registered to my website. Your help would be very much appreciated!
There's a package for Django third party auth that is well maintained, Django-allauth:
https://readthedocs.org/projects/django-allauth/
I use it for Facebook, Twitter and Google auth methods.
There is also a good step by step tutorial:
http://www.sarahhagstrom.com/2013/09/the-missing-django-allauth-tutorial/
The tutorial walks through Facebook as an example. It is slightly out of date but still works. Facebook has tweaked their interface since it was written. Good luck!
If you are trying to develop a Web-Application and use FaceBook login, register as a facebook developer (it is free) and then go through their instructions. It is completely self-explanatory and quite easy to follow.
Visit : developers.facebook.com for clear way of how to do this.
https://djangopackages.org/grids/g/facebook-authentication/
you can choose from this list of django packages available, based on your requirement. If you are planning to integrate other social site logins in future then go with django-allauth or django-social-auth.

Twitter Auth with Django

What is the best twitter auth plugin for Django. I do not understand why django-social-auth and django socialregistration suck so badly, but authentication to both facebook + twitter is not that hard and there seems to be no good django packages for either.
Please prove me wrong.
Thanks
I've attempted using allauth, but haven't gotten it to work.
This post lead me to it:
http://hackerluddite.wordpress.com/2011/05/17/review-of-4-django-social-auth-apps/
Let us know what you find that works.
I've also tested django-social-auth and django-socialregistration and they sucked. Things like easily fixed AttributeErrors caused by the software not being kept up to date with the latest Django. They also build upon the model that you authenticate with any of the social auth provider, but you still have to create a new account to login.
Then I tried Janrain and it is the best thing since sliced bread. You can either use it standalone because it is not so hard to integrate its javascript and json api yourself from scratch. Or use django-rpx-plus (RPX is the old name for Janrain) that provides some views and data structures to make integration even easier.
Using Janrain, it is easy to just let your users click on the google/twitter/facebook icon, click accept on the providers page shown in a popup and voila! logged in! The only downsides are the Janrain branding shown in the free version and that you have to rely on a third party for authentication.

Best way to Sign in to Twitter with Django

I use these 3 ways to login twitter on django, but not successful now:
Django-SocialAuth
django-twitterauth
http://hameedullah.com/step-by-step-guide-to-use-sign-in-with-twitter-with-django.html
I'm tired with it, so are there any other ways to sign in to Twitter with Django.
I've recently been using this for a project. Its pretty good.
https://github.com/ryanmcgrath/twython-django
I recently used Django Social Registration and liked it a lot. It also handles other oauth, oauth2, and openid services.
I assume your question is "Best way to sign in to Django with Twitter" and not the other way around? Put a bit broader, your question is basically of the form "Best way to sign in to Django with (insert-favorite-social-network)", one version of which is discussed over here:
A simple and up-to-date way to implement Facebook login in a Django app
Btw, allauth stores the access token for you. Check here how it can be used to post a tweet:
How to status update on twitter in django with Oauth

A question about Django and Google Apps

Just wondering about this, is it possible to use Django with the Google Apps API's? I have a small organization that uses Google Apps Education Edition. I was thinking about making a small intranet using Django, and I would love if the first page they saw when they logged in had a few widgets with their email, calendar, maybe docs. I looked over some of the api's, and it seemed that getting the data was possible using the gdata library; but when I looked into using Django, all the search results returned pages about running Django on the app engine, nothing about Google Apps. Just looking for a little guidance, if anyone knew a page or a tutorial where someone had done this.
Thanks!
Yes, it is possible. This is not a question about Django and GAE in particular; you may have more luck searching for tutorials on using Django with generic web APIs.
Here's one I found almost immediately; it uses the del.icio.us API but the idea is the same.
Yes, it is. See this help topic.

Categories