Django-social-auth (note the hyphen ;)) uses LOGIN_URL as the URL to redirect
in case of errors if LOGIN_ERROR_URL is not defined, you might be getting an
error and being redirected to your LOGIN_URL and as your value is
/login/twitter/ you are restarting the process again.

Another possible flaw is your SOCIAL_AUTH_ENABLED_BACKENDS = ('twitter')
you should add a comma after the value or it won't be a valid tuple, like this:

    SOCIAL_AUTH_ENABLED_BACKENDS = ('twitter',)

Regards,
Matías

Excerpts from coded kid's message of 2012-02-03 12:57:57 -0200:
> Yes, I've tried it. What's the main url you guys put in your
> LOGIN_URL? Because mine is '/login/twitter/' thats where the problem
> is.
> 
> On Feb 3, 10:46 am, Kevin <kveron...@gmail.com> wrote:
> > Did you take a look at the example project?
> >
> > https://github.com/omab/django-social-auth/tree/master/example
> >
> > Compare it with your own project, or even use this example project as
> > a base for your own project.
> >
> > If all your urls.py contains is "url(r'',
> > include('social_auth.urls')), " and no other definitions, this could
> > be why it redirecting, as it cannot find the URL it's suppose to land
> > on.  Check the output in the Windows command window and see what URLs
> > are being requested and see if there's anything odd.
> >
> > On Feb 3, 2:12 am, coded kid <duffleboi...@gmail.com> wrote:
> >
> >
> >
> > > Just keep getting redirect error. My Api keys are correct. Do you use
> > > the same LOGIN URL with the one above? Whats the main login url to
> > > twitter auth form?
> >
> > > On Feb 2, 5:23 pm, Thorsten Sanders <thorsten.sand...@gmx.net> wrote:
> >
> > > > I took your config and its working fine, maybe your twitter api key is
> > > > wrong?
> >
> > > > On 02.02.2012 11:22, coded kid wrote:
> >
> > > > > I'm getting a redirect loop error. Whats the probs?
> >
> > > > > On Feb 1, 1:22 pm, Thorsten Sanders<thorsten.sand...@gmx.net>  wrote:
> > > > >> Some sort of error traceback/description would be helpful, from a 
> > > > >> quick
> > > > >> look it seems all right.
> >
> > > > >> On 01.02.2012 13:23, coded kid wrote:
> >
> > > > >>> Hey guys, I'm facing a huge  problem with omab/django/socialauth.
> > > > >>> After setting all the necessary settings, I clicked on the Enter
> > > > >>> using Twitter link on my homepage, it couldn t redirect me to where 
> > > > >>> I
> > > > >>> will enter my twitter username and password. Below are my settings.
> > > > >>> In settings.py
> > > > >>> INSTALLED_APPS = (
> > > > >>> 'social_auth',
> > > > >>> }
> > > > >>> TEMPLATE_CONTEXT_PROCESSORS = (
> > > > >>>      "django.core.context_processors.auth",
> > > > >>>      "django.core.context_processors.debug",
> > > > >>>      "django.core.context_processors.i18n",
> > > > >>>      "django.core.context_processors.media",
> > > > >>>      "django.core.context_processors.static",
> > > > >>>     "django.contrib.messages.context_processors.messages",
> > > > >>>     "django.core.context_processors.request",
> > > > >>>      social_auth.context_processors.social_auth_by_type_backends ,
> > > > >>> )
> > > > >>> AUTHENTICATION_BACKENDS = (
> > > > >>>      'social_auth.backends.twitter.TwitterBackend',
> > > > >>>     'django.contrib.auth.backends.ModelBackend',
> > > > >>> )
> > > > >>> SOCIAL_AUTH_ENABLED_BACKENDS = ('twitter')
> > > > >>> TWITTER_CONSUMER_KEY         = '0hdgdhsnmzHDGDK'
> > > > >>> TWITTER_CONSUMER_SECRET      = 'YyNngsgw[1jw lcllcleleedfejewjuw'
> > > > >>> LOGIN_URL = '/accounts/login/' #login form for users to log in with
> > > > >>> their username and password!
> > > > >>> SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/homi/'  #page after user get
> > > > >>> authenticated
> > > > >>> SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL = '/homi/'   '  #page after
> > > > >>> user get authenticated
> > > > >>> SOCIAL_AUTH_ERROR_KEY='social_errors'
> > > > >>> SOCIAL_AUTH_COMPLETE_URL_NAME  = 'socialauth_complete'
> > > > >>> SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'socialauth_associate_complete'
> > > > >>> from django.template.defaultfilters import slugify
> > > > >>> SOCIAL_AUTH_USERNAME_FIXER = lambda u: slugify(u)
> > > > >>> SOCIAL_AUTH_UUID_LENGTH = 16
> > > > >>> SOCIAL_AUTH_EXTRA_DATA = False
> > > > >>> In urls.py
> > > > >>> url(r'', include('social_auth.urls')),
> > > > >>> In my template:
> > > > >>> <p>
> > > > >>>    <a href="{% url socialauth_begin 'twitter' %}">Enter using 
> > > > >>> Twitter</
> > > > >>> a>
> > > > >>>    </p>
> > > > >>> </form>
> > > > >>> What do you think I m doing wrong? Hope to hear from you soon. 
> > > > >>> Thanks
> > > > >>> so much!
> > > > >>> N:B : I m coding on windows machine. And in the development
> > > > >>> environment using localhost:8000.
-- 
Matías Aguirre (matiasagui...@gmail.com)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to