Skip to content

Fix space assignment during social signup - #4752

Open
tecosaur wants to merge 2 commits into
TandoorRecipes:developfrom
tecosaur:fix-oidc-signup-space
Open

Fix space assignment during social signup#4752
tecosaur wants to merge 2 commits into
TandoorRecipes:developfrom
tecosaur:fix-oidc-signup-space

Conversation

@tecosaur

Copy link
Copy Markdown

I ran into an annoying bug while trying to add other people to Tandoor, which I think is best described by the commit message (reproduced below)


With SOCIALACCOUNT_AUTO_SIGNUP enabled, django-allauth bypasses the social signup form and creates the user directly via the social account adapter, so AllAuthSocialSignupForm.signup() never ran and SOCIAL_DEFAULT_ACCESS users received no UserSpace. They were then prompted to create their own space instead of joining the shared one.

Move the default-space assignment to TandoorSocialAccountAdapter.save_user(), the common hook for both automatic (form=None) and form-based signup. The form's signup() override is removed entirely; allauth's base form already provides a no-op, and dropping it avoids assigning the space twice.

tecosaur added 2 commits July 19, 2026 14:38
With SOCIALACCOUNT_AUTO_SIGNUP enabled (the default), django-allauth
bypasses the social signup form and creates the user directly via the
social account adapter, so AllAuthSocialSignupForm.signup() never ran
and SOCIAL_DEFAULT_ACCESS users received no UserSpace. They were then
prompted to create their own space instead of joining the shared one.

Move the default-space assignment to
TandoorSocialAccountAdapter.save_user(), the common hook for both
automatic (form=None) and form-based signup. The form's signup()
override is removed entirely; allauth's base form already provides a
no-op, and dropping it avoids assigning the space twice.
@vabene1111

Copy link
Copy Markdown
Collaborator

thank you. have you tested this to work with proxy, third party auth and just normal user/password auth?

@vabene1111 vabene1111 moved this to Todo in Tandoor 2 Aug 3, 2026
@tecosaur

Copy link
Copy Markdown
Author

I've only tested it with OIDC, since the change just affects the AllAuthSocialSignupForm and TandoorSocialAccountAdapter classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants