Skip to content
Sites Hackathon is live / Aug 29 - Sep 12
Back

expo-apple-authentication and appwrite

  • 0
  • React Native
  • Auth
nao
1 Sep, 2025, 15:09

Hi everyone,

I'm completely new to using Appwirte and would like to add the “Sign in with Apple” method to my app.

I have successfully got OAuth with Apple up and running, but this opens a web window on an iOS simulator where you have to log in with your Apple ID. I don't think this is very attractive, as Apple now supports modals like the one in the attached image. As far as I know, these are possible with expo-apple-authentication. Is there any documentation on how to connect this or boilerplate code that I can use?

TL;DR
Developers looking to implement “Sign in with Apple” using expo-apple-authentication should refer to AppleAuthenticationCredential object for credentials received using AppleAuthentication.signInAsync. This allows for a smoother integration with a modal login experience. Make use of the provided fields to enhance the app's authentication process and user experience.
nao
1 Sep, 2025, 15:13

for context:

TypeScript
export type AppleAuthenticationCredential = {
  /**
   * An identifier associated with the authenticated user. You can use this to check if the user is
   * still authenticated later. This is stable and can be shared across apps released under the same
   * development team. The same user will have a different identifier for apps released by other
   * developers.
   */
  user: string;

  /**
   * An arbitrary string that your app provided as `state` in the request that generated the
   * credential. Used to verify that the response was from the request you made. Can be used to
   * avoid replay attacks. If you did not provide `state` when making the sign-in request, this field
   * will be `null`.
   */
  state: string | null;

  /**
   * The user's name. May be `null` or contain `null` values if you didn't request the `FULL_NAME`
   * scope, if the user denied access, or if this is not the first time the user has signed into
   * your app.
   */
  fullName: AppleAuthenticationFullName | null;

  /**
   * The user's email address. Might not be present if you didn't request the `EMAIL` scope. May
   * also be null if this is not the first time the user has signed into your app. If the user chose
   * to withhold their email address, this field will instead contain an obscured email address with
   * an Apple domain.
   */
  email: string | null;

  /**
   * A value that indicates whether the user appears to the system to be a real person.
   */
  realUserStatus: AppleAuthenticationUserDetectionStatus;

  /**
   * A JSON Web Token (JWT) that securely communicates information about the user to your app.
   */
  identityToken: string | null;

  /**
   * A short-lived session token used by your app for proof of authorization when interacting with
   * the app's server counterpart. Unlike `user`, this is ephemeral and will change each session.
   */
  authorizationCode: string | null;
};
nao
1 Sep, 2025, 15:14

this is the credentials object you get when using expo apple auths AppleAuthentication.signInAsync

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more