-
Notifications
You must be signed in to change notification settings - Fork 11
Description
part of #275
after this, you may do #340
after that can do #276
FES = FlowCrypt Enterprise Server https://flowcrypt.com/docs/technical/enterprise-server/latest/enterprise-server.html
Flow:
- parse out user domain:
user@example.com->example.com - skip all following steps if user is on public email domain (@ gmail, @ outlook)
- call
GET https://fes.$domain/api/(no authentication) for exampleGET https://fes.corp.com/api/. If it returns a 404 or the server cannot be reached within 4 seconds, skip following steps (similar failure handling to WKD policy call) - make sure that the response contains json parameter
servicewhich must equalenterprise-server. If it shows something else or this is not contained, show an error. - show a toast message that says
FES at $url not supported on iOS yet
The class that does steps 1-4 should be EnterpriseServerApiClient eg a method func getActiveFesUrl(for email: String): Promise<String?> (nil if no FES runs there, else url of the server).
Do the above during setup immediately after authentication (once you know user email address)
You can test this flow using your Google account at flowcrypt.com domain which I'll send you. Here is the API that you will be calling in that case: https://fes.flowcrypt.com/api/ but of course the domain is dynamic, so you may be calling another URL if you used account on another domain.