migajek
migajek

Reputation: 8614

django-social-auth registration extra step

I'm using django-social-auth & custom User model (django 1.5) with extra fields which are required. I need the user to fill these fields before the models is saved. Is there any way to "interrupt" the django-social-auth right after the backend authorization succeeded, but before the new User model is created, in order to show the form asking for account details?

Thanks in advance

Upvotes: 1

Views: 1020

Answers (1)

omab
omab

Reputation: 3701

You add a pipeline entry which returns a HttpResponseRedirect to any place you need. Check the example app with django-social-auth, it cuts the pipeline in two places (here and here) to ask the user some extra information. The first one takes place before the user instance is created.

Check the save_status_to_session call before each break, that is required to ensure the pipeline status when it's continued.

Upvotes: 5

Related Questions