django-allauth icon indicating copy to clipboard operation
django-allauth copied to clipboard

feat(accounts): Add redirect handling to /accounts/social SignupView

Open denisemauldin opened this issue 2 years ago • 1 comments

Submitting Pull Requests

General

  • [x] Make sure you use semantic commit messages. Examples: "fix(google): Fixed foobar bug", "feat(accounts): Added foobar feature".
  • [x] All Python code must formatted using Black, and clean from pep8 and isort issues.
  • [ ] JavaScript code should adhere to StandardJS.
  • [ ] If your changes are significant, please update ChangeLog.rst.
  • [ ] If your change is substantial, feel free to add yourself to AUTHORS.

Provider Specifics

In case you add a new provider:

  • [ ] Make sure unit tests are available.
  • [ ] Add an entry of your provider in test_settings.py::INSTALLED_APPS and docs/installation.rst::INSTALLED_APPS.
  • [ ] Add documentation to docs/providers.rst.
  • [ ] Add an entry to the list of supported providers over at docs/overview.rst.

denisemauldin avatar May 24 '22 23:05 denisemauldin

@pennersr Not sure if tests are necessary, but happy to write some based off suggestions.

denisemauldin avatar May 25 '22 01:05 denisemauldin

When the form is valid, the social signup view ends with a call to: helpers.complete_social_signup(). Inside that method, the next URL stashed in the sociallogin is already used (sociallogin.get_redirect_url(request)), which is identical to the next = sociallogin.state.get(REDIRECT_FIELD_NAME, None) call that you are adding. So redirects should already be properly be handled. if not, then we definitely could use a test case to expose the problem you are trying to address here.

pennersr avatar Oct 13 '23 12:10 pennersr