Page MenuHomePhabricator

[keyserver] Handle web invite links on keyserver
ClosedPublic

Authored by tomek on Tue, May 23, 9:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 3, 11:31 PM
Unknown Object (File)
Sat, Jun 3, 11:05 AM
Unknown Object (File)
Sat, Jun 3, 7:19 AM
Unknown Object (File)
Fri, Jun 2, 5:08 PM
Unknown Object (File)
Wed, May 31, 11:47 AM
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.Tue, May 23, 9:32 AM
Harbormaster returned this revision to the author for changes because remote builds failed.Tue, May 23, 9:49 AM
Harbormaster failed remote builds in B19697: Diff 26910!
tomek requested review of this revision.Wed, May 24, 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.Thu, May 25, 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