HomePhabricator
Diffusion Comm b062e658340c

[keyserver][native] Fix invite links setup

Description

[keyserver][native] Fix invite links setup

Summary:
Our invite link url is https://comm.app/invite/:secret.

In our prod setup, we forward all the traffic from comm.app to localhost:3000/commlanding, which means that our invite link gets replaced by localhost:3000/commlanding/invite/:secret and that means that we should handle this route in landing router. It doesn't hurt to also support it in web router - /invite/:secret gets replaced later by /handle/invite/:secret, so it doesn't cause any issue, but has a benefit that in some other configs would still work.

In inviteResponder for web, we were assuming that the route is handled by web router. This is no longer the case, and we have to explicitly forward to web url.

The final issue was that, our invite links for iOS and Android were configured for web.comm.app domain instead of comm.app. This requires updating inviteResponder for iOS (as there's a link url), and Comm.entitlements. In order to avoid redirecting all the traffic from comm.app to the mobile app, we have to introduce some filtering: for iOS, we modify AASA file to only handle /invite route. For Android, we set pathPrefix in Manifest.

https://linear.app/comm/issue/ENG-4089/invite-links-dont-work-on-prod

Test Plan:
Some changes can't be tested yet, as we have to update .well-known files on server for the deep links on native to be updated.
The part with landing was tested by checking if accessing /commlanding/invite/:secret results in web app /handle/invite/:secret route being accessed.

Reviewers: bartek, kamil, inka

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D8255

Details

Provenance
tomekAuthored on Jun 20 2023, 4:25 AM
Reviewer
kamil
Differential Revision
D8255: [keyserver][native] Fix invite links setup
Parents
rCOMMbd5f5b2f701e: [web] Refresh invite links
Branches
Unknown
Tags
Unknown