Skip to content

v0.28.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 18:34
· 181 commits to main since this release

Native sign-in with Apple and Google

v0.28.0 lets a mobile app sign in with the platform's own sheet (Sign in with Apple, Google sign-in) instead of a browser tab. The app sends the ID token it gets to the server, which checks it and signs the user in.

New

  • POST /api/v1/auth/{collection}/oauth2/id-token takes { provider, id_token, nonce, name } for apple or google. The server checks the token's signature against the provider's published keys, its issuer, expiry and audience, and each token signs in only once. The answer is the same as the browser flow's: a session, merge_required when the email belongs to an existing account, or mfa_required for an account with two-factor on. Users who sign in with Google on the web and in the app are the same user.
  • POST /api/v1/auth/{collection}/oauth2/id-token/nonce returns a single-use nonce (10 minutes) for the sign-in sheet. Required for Apple; optional for Google, whose Flutter plugin sets the nonce once per launch.
  • New settings oauth2.apple.native_client_ids (the app's bundle ID) and oauth2.google.native_client_ids (the iOS and Android client IDs) list the apps whose tokens are accepted, besides the provider's client_id. Both are in the admin under Settings → OAuth2.

The Dart / Flutter SDK has it as signInWithIdToken; see Native Apple and Google sign-in and the API reference.

Upgrade notes

  • Nothing to do. If Apple or Google sign-in is already enabled, the new endpoint accepts ID tokens issued to its client_id straight away (still single-use, still checked); add the apps' IDs to native_client_ids to accept theirs. The upgrade notes for v0.27.0 apply if you are coming from an earlier version.

Full Changelog: v0.27.3...v0.28.0