-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Trigger invitation acceptation even if different e-mail address signs up with allauth #87
Comments
Another issue is that allauth will assume the stashed e-mail address ( Example: in case the original invitation was sent to a general address like |
It seems correct that both emails end up on the account, but I suppose it could be confusing. |
Thanks @janfabry, I just had the same question. Actually, I was trying to do exactly what you did, setting up the user in some way after account creation. But I am new to Django signals. If you won't mind could you please share the code for the handling code for post_account creation? I would appreciate any help! |
Hi! If the registration flow doesn't include another email verification step (which is cumbersome because the invitee has to check her email once already):
It would be great to have the possibility to add the key in the session and to send it with the signals along with the email. |
You can see an implementation here. Very basic. 6 lines of code. |
The app doesn't pre-fill the email field in for me. Does it only do this if you enable ACCEPT_INVITE_AFTER_SIGNUP? |
If you enable
ACCEPT_INVITE_AFTER_SIGNUP
, the invitation to accept is looked up based on the e-mail address used to complete the signup. Because this field is editable (but pre-filled), it's possible the user enters a different e-mail address, and the original invitation will not be found and never marked as accepted.In my case I have post-acceptance triggers that will give a user rights to edit a specific object. So user Alice will invite user Bob with the e-mail address [email protected], but if Bob follows the link and creates his account as [email protected], his invitation will not be marked as accepted and he can not get the necessary permissions.
I think a solution would be to store the invitation in the session (in the
AcceptInvite
view) and retrieve this actual invitation in theaccept_invite_after_signup
signal handler. Theinvite_accepted
signal might then need to be changed as well: don't just send the e-mail address of the original invitation, but the e-mail address used to accept it as well.The text was updated successfully, but these errors were encountered: