Skip to content

Commit c7b37e2

Browse files
committed
auth [nfc]: Expand comment on Apple-auth host check.
1 parent b72e9a3 commit c7b37e2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/start/AuthScreen.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,13 @@ class AuthScreen extends PureComponent<Props> {
281281
// TODO: Check this much sooner.
282282
}
283283

284-
// Check that the realm we're actually sending requests to,
285-
// which is basically the URL the user entered on the first
286-
// screen, is trusted by the official mobile app.
284+
// The native flow for Apple auth assumes that the app and the server
285+
// are operated by the same organization, so that for a user to
286+
// entrust private information to either one is the same as entrusting
287+
// it to the other. Check that this realm is on such a server.
288+
//
289+
// (For other realms, we'll simply fall back to the web flow, which
290+
// handles things appropriately without relying on that assumption.)
287291
const isTrusted = config.appOwnDomains.some(
288292
domain => host !== undefined && (host === domain || host.endsWith(`.${domain}`)),
289293
);

0 commit comments

Comments
 (0)