Page MenuHomePhabricator

[keyserver] Handle web invite links on keyserver
ClosedPublic

Authored by tomek on May 23 2023, 9:31 AM.
Tags
None
Referenced Files
F3409923: D7948.diff
Wed, Dec 4, 7:07 PM
Unknown Object (File)
Fri, Nov 22, 1:32 AM
Unknown Object (File)
Fri, Nov 8, 12:01 AM
Unknown Object (File)
Thu, Nov 7, 11:48 PM
Unknown Object (File)
Thu, Nov 7, 11:45 PM
Unknown Object (File)
Thu, Nov 7, 11:20 PM
Unknown Object (File)
Thu, Nov 7, 11:13 PM
Unknown Object (File)
Thu, Nov 7, 10:50 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
Branch
invite2
Lint
No Lint Coverage
Unit
No Test Coverage

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