6

http://github.com/uswaretech/Django-Socialauth/tree/master/socialauth/

I'm a bit confused on how I should use this. Of course, I read the notes at the bottom but I'm a Django novice so I'll need a little hand holding.

The structure of this looks like a project structure since it contains a urls.py but I'm also aware that applications can also have that. It also has a manage.py which leads me to believe it's a project ( plus the subdirectories ).

So should I just be integrating portions of this into my existing project? This isn't an application, right?

The README also mentions grabbing API Keys. So if I want a standard interface where you click on a google/yahoo logo and it forwards itself via Javascript to the authentication page where you login if you already aren't logged in, kicks you back to your own page, would I need API keys?

Any other special tips are appreciated.

meder omuraliev
  • 183,342
  • 71
  • 393
  • 434

2 Answers2

4

[We wrote this]

  1. There are quite a few forks, which are ahead of us so you might want to use that.
  2. If you just want openid, you dont need API Keys
  3. If you want twitter/FB you definately need keys.
  4. urls.py and manage.py are too show a demo app.
  5. socialauth is the django app, which you can pull out.
agiliq
  • 7,518
  • 14
  • 54
  • 74
  • 3
    I see now. Can you recommend a specific fork to use? – meder omuraliev Mar 11 '10 at 20:43
  • Ok. I moved over `socialauth` and `openid_consumer` to my project root. I added both to `settings.py`. I also set `LOGIN_REDIRECT_URL = '/login/done/'` and `LOGOUT_REDIRECT_URL = '/'`. I `syncdb`'d and went to `/accounts/` and clicked on the Google link, it successfully returned me back to the homepage. I didn't get the edit profile link. Could that be because I didn't setup a url pattern for `socialauth.views.signin_complete` ? – meder omuraliev Mar 14 '10 at 07:36
  • Another note - from the localsettings I only took `AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'socialauth.auth_backends.OpenIdBackend',)` and put it into my settings.py, nothing else. BTW - for now I only care about gmail/openID/yahoo, not facebook or twitter. – meder omuraliev Mar 14 '10 at 07:50
  • If you still havent got this working, email me on shabda@.com and I will help you set this up. – agiliq Mar 14 '10 at 19:06
  • i'm exactly in the same situation as meder and would like to know how you managed to redirect to edit page and after to the page where the '@login_required' was asked? thanks – Mermoz Aug 19 '10 at 19:48
2

I would use the fork from agiliq (same guys).

If you look at the commits in agiliq and uswaretech, you will see that the agiliq fork has more recent commits.

And you could also use django-social-auth, which might seem to be another fork, but it's a completely different implementation.

Juande Carrion
  • 750
  • 8
  • 11