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

3PID invites don't work if you reuse the same tab you're registering with #13430

Open
ara4n opened this issue Apr 28, 2020 · 8 comments
Open
Labels
A-3PIDs O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Regression

Comments

@ara4n
Copy link
Member

ara4n commented Apr 28, 2020

To reproduce:

  • Invite an email for a user who isn't on Matrix to a room
  • User gets an email inviting them to sign up on Riot
  • User signs up on Riot; so far so good.
  • User has to verify their email, despite answering a 3PID invite in the first place, which feels a bit redundant but not the end of the world.
  • 3PID invite isn't converted to a normal invite.
  • If you try to re-invite the user again, it sends them another 3PID invite. It's like their 3PID mapping was never bound on the IS.
@ara4n ara4n added the T-Defect label Apr 28, 2020
@turt2live turt2live self-assigned this Apr 28, 2020
@turt2live turt2live added this to In Progress in Web App Team via automation Apr 28, 2020
@turt2live turt2live changed the title 3PID invites don't work any more. 3PID invites don't work if you reuse the same tab you're registering with Apr 28, 2020
@turt2live turt2live removed their assignment Apr 28, 2020
@turt2live turt2live moved this from In Progress to Raging Inferno 🔥🔥🔥 in Web App Team Apr 28, 2020
@turt2live
Copy link
Member

If you share the email after reusing the same tab, it'll figure it out. Otherwise it largely seems to expect multiple tabs to be used.

@dbkr
Copy link
Member

dbkr commented May 15, 2020

So I think there's a whole collection of problems here, but possibly the root of the problem is that once you're done signing up, we now don't log you in straight away, instead telling you to sign in, and we don't persist the invite intent after you signed in, so we dump you in an empty client rather than prompting you to join the room you were invited to. In which case the fix would be to show the room you were invited to after you sign in, although it's still a complex process.

As Travis says, the 3pid invite won't come through as a regular invite unless you go into settings and share the email (clicking a third email link!) because we don't publish mappings to ISes by default in a post-privacy world.

I'm not sure what bearing re-using tabs has on anything.

@bwindels bwindels removed this from Raging Inferno 🔥🔥🔥 in Web App Team May 25, 2020
@ara4n
Copy link
Member Author

ara4n commented Jul 27, 2020

This is biting some VIPs.

@neilisfragile neilisfragile added this to In Progress in Web App Team via automation Aug 18, 2020
@neilisfragile neilisfragile moved this from In Progress to Raging Inferno 🔥🔥🔥 in Web App Team Aug 18, 2020
@jryans
Copy link
Collaborator

jryans commented Aug 26, 2020

@ara4n @neilisfragile At the moment, we're a bit stuck on this one, because as @dbkr suggests above, it's unclear what change we actually want to make here. I'll leave this in the fire column for now until Neil returns so we remember to discuss it.

@neilisfragile
Copy link
Member

More context on how to reproduce the bug via @ara4n and @nadonomy

"If you reuse the tab for both invite and validation in signup then it all breaks and if you then “go back to the app” by copy pasting the link from the invite email, you can’t login any more"

@turt2live turt2live self-assigned this Sep 9, 2020
@turt2live turt2live moved this from Raging Inferno 🔥🔥🔥 to In Progress in Web App Team Sep 9, 2020
@turt2live
Copy link
Member

turt2live commented Sep 9, 2020

I can't reproduce this, and am unclear what the actual root issue is here. We seem to have made Element remember the room ID you were looking at, though it can disappear with ease. I've flagged #15131 to cover a related case to this.

Some reports are that a login link isn't working, but I've been unable to reproduce any significant problems on 3 different stacks (local, matrix.org, custom).

The overall flow is pretty terrible, which might be the bug here. I've tracked this as #15130 pending design to triage.

@turt2live
Copy link
Member

Right, so this issue is complicated but boils down to us losing state due to people pasting the identity server verification link over top of the app. Fixing that properly leads into some cobwebs around the auth system, so as a quick win we're going to fix this for the affected VIPs using alternative methods (if possible) and look at resolving this properly alongside the numerous other 3pid invite issues.

@turt2live
Copy link
Member

For others trying to fix this: the solution is to run 3PID invites through the homeserver rather than the identity server. For Synapse this means not using account_threepid_delegates and instead setting up the email configuration (including client_baseurl) so it can send things. Sydent can still be used to store the invite, though #15131 and #15134 apply.

turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Sep 12, 2020
This is a step towards element-hq/element-web#13430

Since we've stored the invite, we can send the user to it once they reload the page or revisit Element. We currently only support one invite at a time, but this should be fine for most cases. 

We only do this restoration if the next screen isn't set to avoid breaking the user out of an expected flow.

As an added touch, this also ensures that the email address is pre-filled on the registration page if needed, just in case the user refreshes before getting to the submit button.
@MadLittleMods MadLittleMods added S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-3PIDs O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Sep 6, 2022
@kittykat kittykat removed the P1 label Oct 18, 2022
@turt2live turt2live removed their assignment Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-3PIDs O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Regression
Projects
No open projects
Development

No branches or pull requests

7 participants