Page MenuHomePhabricator

[keyserver] Handle web invite links on keyserver

Authored by tomek on May 23 2023, 9:31 AM.
Referenced Files
Unknown Object (File)
Thu, May 2, 9:18 PM
Unknown Object (File)
Thu, May 2, 6:02 AM
Unknown Object (File)
Tue, Apr 30, 8:17 PM
Unknown Object (File)
Sat, Apr 27, 4:21 AM
Unknown Object (File)
Apr 25 2024, 7:48 PM
Unknown Object (File)
Apr 5 2024, 2:26 PM
Unknown Object (File)
Apr 4 2024, 9:10 PM
Unknown Object (File)
Apr 4 2024, 9:10 PM



This is a really simple diff that achieves a lot.
After clicking an invite link on web a user is redirected to the app. In the app, this new route isn't implemented, so the user either sees a login screen or a place which was opened in the most recent session, which is exactly what we want.

Instead of simply using ${baseRoutePath}invite/${secret} I had to create something different, because in case of an empty base path, we would get a redirect loop.

Test Plan

Open localhost:3000/invite/abc on web - it should be redirected to localhost:3000/comm/handle/invite/abc and then e.g. to localhost:3000/comm/.
On iOS accepting invite flow should still work.

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

tomek retitled this revision from [server] Handle web invite links on keyserver to [keyserver] Handle web invite links on keyserver.May 23 2023, 9:32 AM
Harbormaster returned this revision to the author for changes because remote builds failed.May 23 2023, 9:49 AM
Harbormaster failed remote builds in B19697: Diff 26910!
tomek requested review of this revision.May 24 2023, 4:05 AM
kamil added inline comments.
577 ↗(On Diff #26952)

Are you sure this is necessary? Simply ${baseRoutePath ?? '/'} will not work even with an empty path?

This revision is now accepted and ready to land.May 25 2023, 5:05 AM
577 ↗(On Diff #26952)

ahh I see after looking at the rest of the stack, ignore my question