Page MenuHomePhabricator

[keyserver] Handle web invite links on keyserver
ClosedPublic

Authored by tomek on May 23 2023, 9:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 20 2024, 8:29 AM
Unknown Object (File)
Feb 20 2024, 7:07 AM
Unknown Object (File)
Feb 20 2024, 6:37 AM
Unknown Object (File)
Feb 19 2024, 9:54 PM
Unknown Object (File)
Feb 7 2024, 2:41 PM
Unknown Object (File)
Dec 31 2023, 8:51 PM
Unknown Object (File)
Dec 17 2023, 1:03 AM
Unknown Object (File)
Dec 16 2023, 11:05 PM
Subscribers

Details

Summary

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

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
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.
keyserver/src/responders/website-responders.js
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
keyserver/src/responders/website-responders.js
577 ↗(On Diff #26952)

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