Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect loop #234

Closed
kouroshshafi opened this issue Jan 22, 2012 · 6 comments
Closed

redirect loop #234

kouroshshafi opened this issue Jan 22, 2012 · 6 comments

Comments

@kouroshshafi
Copy link

Well, It is more a request for help than an issue, I've got it working and it is a really nice app.

I was thinking to get the profile picture from facebook and I tried this gist

https://gist.github.com/1248728

it is a very simple pre_update signal. My problem is that when it completes the process, it is again redirected to login! and it falls into a redirect loop till it crashes.

Anybody might have a clue which setting parameters might be wrong? Once again, it works very well without the signal (written in the gist). well, here are my settings

LOGIN_REDIRECT_URL = '/walls/wall'
LOGOUT_URL= '/accounts/logout/'

SOCIAL_AUTH_COMPLETE_URL_NAME = 'socialauth_complete'
SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'socialauth_associate_complete'

SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/walls/wall'
SOCIAL_AUTH_LOGIN_REDIRECT_URL="/walls/wall"
AUTH_PROFILE_MODULE= 'profiles.UserProfile'
FACEBOOK_EXTENDED_PERMISSIONS = ['email']
LOGIN_URL= '/login/facebook'

Another thing, what does disconnect do? because it is only with django.contrib.auth.logout that actually logging out happens.

thanks

@kouroshshafi
Copy link
Author

well, the signal for registration for the same code works. take a look at https://gist.github.com/1662930
it means there is a problem with pre_update signal.

@elsurudo
Copy link

elsurudo commented Feb 4, 2012

I'm having the same problem. Removing the pre_update handler solves the redirect issue, but where should I move the code that used to run on pre_update? Have you found a workaround?

@elsurudo
Copy link

elsurudo commented Feb 4, 2012

I managed to find a workaround, although it's not ideal.

On pre-update, I had been starting a few async tasks to do with pulling some user information from Facebook, as well as firing off some emails. These were being called with celery's "delay" method. Just calling the task methods synchronously seems to have fixed the redirect issue, although I have no idea why...

@omab
Copy link
Owner

omab commented Feb 6, 2012

This is really odd, any clue on your points?

@elsurudo
Copy link

elsurudo commented Feb 6, 2012

No, I haven't been able to find the cause yet. Right now I'm on a tight schedule so I can't afford to look further, but I will try when I have the time...

@omab
Copy link
Owner

omab commented Apr 16, 2012

Closing, reopen if it's still relevant or have more data to check it.

@omab omab closed this as completed Apr 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants