expo-apple-authentication 6.2.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 6.4.0 — 2024-04-18
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 6.3.0 — 2023-11-14
18
+
19
+ ### 🛠 Breaking changes
20
+
21
+ - Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
22
+
13
23
  ## 6.2.0 — 2023-10-17
14
24
 
15
25
  ### 💡 Others
@@ -1 +1 @@
1
- {"version":3,"file":"AppleAuthentication.js","sourceRoot":"","sources":["../src/AppleAuthentication.ts"],"names":[],"mappings":"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","sourcesContent":["import { CodedError, EventEmitter, Subscription, UnavailabilityError } from 'expo-modules-core';\n\nimport {\n AppleAuthenticationCredential,\n AppleAuthenticationCredentialState,\n AppleAuthenticationOperation,\n AppleAuthenticationRefreshOptions,\n AppleAuthenticationSignInOptions,\n AppleAuthenticationSignOutOptions,\n} from './AppleAuthentication.types';\nimport ExpoAppleAuthentication from './ExpoAppleAuthentication';\n\n// @needsAudit\n/**\n * Determine if the current device's operating system supports Apple authentication.\n * @return A promise that fulfills with `true` if the system supports Apple authentication, and `false` otherwise.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.isAvailableAsync) {\n return false;\n }\n return ExpoAppleAuthentication.isAvailableAsync();\n}\n\n// @needsAudit\n/**\n * Sends a request to the operating system to initiate the Apple authentication flow, which will\n * present a modal to the user over your app and allow them to sign in.\n *\n * You can request access to the user's full name and email address in this method, which allows you\n * to personalize your UI for signed in users. However, users can deny access to either or both\n * of these options at runtime.\n *\n * Additionally, you will only receive Apple Authentication Credentials the first time users sign\n * into your app, so you must store it for later use. It's best to store this information either\n * server-side, or using [SecureStore](./securestore), so that the data persists across app installs.\n * You can use [`AppleAuthenticationCredential.user`](#appleauthenticationcredential) to identify\n * the user, since this remains the same for apps released by the same developer.\n *\n * @param options An optional [`AppleAuthenticationSignInOptions`](#appleauthenticationsigninoptions) object\n * @return A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * sign-in operation.\n */\nexport async function signInAsync(\n options?: AppleAuthenticationSignInOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'signInAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.LOGIN,\n };\n const credential = await ExpoAppleAuthentication.requestAsync(requestOptions);\n if (!credential.authorizationCode || !credential.identityToken || !credential.user) {\n throw new CodedError(\n 'ERR_REQUEST_FAILED',\n 'The credential returned by `signInAsync` is missing one or more required fields.'\n );\n }\n return credential;\n}\n\n// @needsAudit\n/**\n * An operation that refreshes the logged-in user’s credentials.\n * Calling this method will show the sign in modal before actually refreshing the user credentials.\n *\n * @param options An [`AppleAuthenticationRefreshOptions`](#appleauthenticationrefreshoptions) object\n * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * refresh operation.\n */\nexport async function refreshAsync(\n options: AppleAuthenticationRefreshOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'refreshAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.REFRESH,\n };\n const credential = await ExpoAppleAuthentication.requestAsync(requestOptions);\n if (!credential.authorizationCode || !credential.identityToken || !credential.user) {\n throw new CodedError(\n 'ERR_REQUEST_FAILED',\n 'The credential returned by `refreshAsync` is missing one or more required fields.'\n );\n }\n return credential;\n}\n\n// @needsAudit\n/**\n * An operation that ends the authenticated session.\n * Calling this method will show the sign in modal before actually signing the user out.\n *\n * It is not recommended to use this method to sign out the user as it works counterintuitively.\n * Instead of using this method it is recommended to simply clear all the user's data collected\n * from using [`signInAsync`](./#signinasync) or [`refreshAsync`](./#refreshasync) methods.\n *\n * @param options An [`AppleAuthenticationSignOutOptions`](#appleauthenticationsignoutoptions) object\n * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * sign-out operation.\n */\nexport async function signOutAsync(\n options: AppleAuthenticationSignOutOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'signOutAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.LOGOUT,\n };\n return ExpoAppleAuthentication.requestAsync(requestOptions);\n}\n\n// @needsAudit\n/**\n * Queries the current state of a user credential, to determine if it is still valid or if it has been revoked.\n * > **Note:** This method must be tested on a real device. On the iOS simulator it always throws an error.\n *\n * @param user The unique identifier for the user whose credential state you'd like to check.\n * This should come from the user field of an [`AppleAuthenticationCredential`](#appleauthenticationcredentialstate) object.\n * @return A promise that fulfills with an [`AppleAuthenticationCredentialState`](#appleauthenticationcredentialstate)\n * value depending on the state of the credential.\n */\nexport async function getCredentialStateAsync(\n user: string\n): Promise<AppleAuthenticationCredentialState> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.getCredentialStateAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'getCredentialStateAsync');\n }\n return ExpoAppleAuthentication.getCredentialStateAsync(user);\n}\n\nconst ExpoAppleAuthenticationEventEmitter = new EventEmitter(ExpoAppleAuthentication);\n\n// @docsMissing\nexport function addRevokeListener(listener: () => void): Subscription {\n return ExpoAppleAuthenticationEventEmitter.addListener('Expo.appleIdCredentialRevoked', listener);\n}\n\nexport { Subscription };\n"]}
1
+ {"version":3,"file":"AppleAuthentication.js","sourceRoot":"","sources":["../src/AppleAuthentication.ts"],"names":[],"mappings":"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","sourcesContent":["import { CodedError, EventEmitter, Subscription, UnavailabilityError } from 'expo-modules-core';\n\nimport {\n AppleAuthenticationCredential,\n AppleAuthenticationCredentialState,\n AppleAuthenticationOperation,\n AppleAuthenticationRefreshOptions,\n AppleAuthenticationSignInOptions,\n AppleAuthenticationSignOutOptions,\n} from './AppleAuthentication.types';\nimport ExpoAppleAuthentication from './ExpoAppleAuthentication';\n\n// @needsAudit\n/**\n * Determine if the current device's operating system supports Apple authentication.\n * @return A promise that fulfills with `true` if the system supports Apple authentication, and `false` otherwise.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.isAvailableAsync) {\n return false;\n }\n return ExpoAppleAuthentication.isAvailableAsync();\n}\n\n// @needsAudit\n/**\n * Sends a request to the operating system to initiate the Apple authentication flow, which will\n * present a modal to the user over your app and allow them to sign in.\n *\n * You can request access to the user's full name and email address in this method, which allows you\n * to personalize your UI for signed in users. However, users can deny access to either or both\n * of these options at runtime.\n *\n * Additionally, you will only receive Apple Authentication Credentials the first time users sign\n * into your app, so you must store it for later use. It's best to store this information either\n * server-side, or using [SecureStore](./securestore), so that the data persists across app installs.\n * You can use [`AppleAuthenticationCredential.user`](#appleauthenticationcredential) to identify\n * the user, since this remains the same for apps released by the same developer.\n *\n * @param options An optional [`AppleAuthenticationSignInOptions`](#appleauthenticationsigninoptions) object\n * @return A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * sign-in operation.\n */\nexport async function signInAsync(\n options?: AppleAuthenticationSignInOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'signInAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.LOGIN,\n };\n const credential = await ExpoAppleAuthentication.requestAsync(requestOptions);\n if (!credential.authorizationCode || !credential.identityToken || !credential.user) {\n throw new CodedError(\n 'ERR_REQUEST_FAILED',\n 'The credential returned by `signInAsync` is missing one or more required fields.'\n );\n }\n return credential;\n}\n\n// @needsAudit\n/**\n * An operation that refreshes the logged-in user’s credentials.\n * Calling this method will show the sign in modal before actually refreshing the user credentials.\n *\n * @param options An [`AppleAuthenticationRefreshOptions`](#appleauthenticationrefreshoptions) object\n * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * refresh operation.\n */\nexport async function refreshAsync(\n options: AppleAuthenticationRefreshOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'refreshAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.REFRESH,\n };\n const credential = await ExpoAppleAuthentication.requestAsync(requestOptions);\n if (!credential.authorizationCode || !credential.identityToken || !credential.user) {\n throw new CodedError(\n 'ERR_REQUEST_FAILED',\n 'The credential returned by `refreshAsync` is missing one or more required fields.'\n );\n }\n return credential;\n}\n\n// @needsAudit\n/**\n * An operation that ends the authenticated session.\n * Calling this method will show the sign in modal before actually signing the user out.\n *\n * It is not recommended to use this method to sign out the user as it works counterintuitively.\n * Instead of using this method it is recommended to simply clear all the user's data collected\n * from using [`signInAsync`](./#signinasync) or [`refreshAsync`](./#refreshasync) methods.\n *\n * @param options An [`AppleAuthenticationSignOutOptions`](#appleauthenticationsignoutoptions) object\n * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential)\n * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the\n * sign-out operation.\n */\nexport async function signOutAsync(\n options: AppleAuthenticationSignOutOptions\n): Promise<AppleAuthenticationCredential> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'signOutAsync');\n }\n const requestOptions = {\n ...options,\n requestedOperation: AppleAuthenticationOperation.LOGOUT,\n };\n return ExpoAppleAuthentication.requestAsync(requestOptions);\n}\n\n// @needsAudit\n/**\n * Queries the current state of a user credential, to determine if it is still valid or if it has been revoked.\n * > **Note:** This method must be tested on a real device. On the iOS simulator it always throws an error.\n *\n * @param user The unique identifier for the user whose credential state you'd like to check.\n * This should come from the user field of an [`AppleAuthenticationCredential`](#appleauthenticationcredentialstate) object.\n * @return A promise that fulfills with an [`AppleAuthenticationCredentialState`](#appleauthenticationcredentialstate)\n * value depending on the state of the credential.\n */\nexport async function getCredentialStateAsync(\n user: string\n): Promise<AppleAuthenticationCredentialState> {\n if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.getCredentialStateAsync) {\n throw new UnavailabilityError('expo-apple-authentication', 'getCredentialStateAsync');\n }\n return ExpoAppleAuthentication.getCredentialStateAsync(user);\n}\n\nconst ExpoAppleAuthenticationEventEmitter = new EventEmitter(ExpoAppleAuthentication);\n\n// @docsMissing\nexport function addRevokeListener(listener: () => void): Subscription {\n return ExpoAppleAuthenticationEventEmitter.addListener('Expo.appleIdCredentialRevoked', listener);\n}\n\nexport { Subscription };\n"]}
@@ -1,7 +1,7 @@
1
1
  import { StyleProp, ViewStyle, ViewProps } from 'react-native';
2
2
  export declare type AppleAuthenticationButtonProps = ViewProps & {
3
3
  /**
4
- * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#isavailableasync)
4
+ * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#appleauthenticationisavailableasync)
5
5
  * in here.
6
6
  */
7
7
  onPress: () => void;
@@ -219,7 +219,7 @@ export declare enum AppleAuthenticationUserDetectionStatus {
219
219
  LIKELY_REAL = 2
220
220
  }
221
221
  /**
222
- * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
222
+ * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
223
223
  */
224
224
  export declare enum AppleAuthenticationButtonType {
225
225
  /**
@@ -237,7 +237,7 @@ export declare enum AppleAuthenticationButtonType {
237
237
  SIGN_UP = 2
238
238
  }
239
239
  /**
240
- * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
240
+ * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
241
241
  */
242
242
  export declare enum AppleAuthenticationButtonStyle {
243
243
  /**
@@ -65,7 +65,7 @@ export var AppleAuthenticationUserDetectionStatus;
65
65
  })(AppleAuthenticationUserDetectionStatus || (AppleAuthenticationUserDetectionStatus = {}));
66
66
  // @needsAudit
67
67
  /**
68
- * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
68
+ * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
69
69
  */
70
70
  export var AppleAuthenticationButtonType;
71
71
  (function (AppleAuthenticationButtonType) {
@@ -85,7 +85,7 @@ export var AppleAuthenticationButtonType;
85
85
  })(AppleAuthenticationButtonType || (AppleAuthenticationButtonType = {}));
86
86
  // @needsAudit
87
87
  /**
88
- * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
88
+ * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
89
89
  */
90
90
  export var AppleAuthenticationButtonStyle;
91
91
  (function (AppleAuthenticationButtonStyle) {
@@ -1 +1 @@
1
- {"version":3,"file":"AppleAuthentication.types.js","sourceRoot":"","sources":["../src/AppleAuthentication.types.ts"],"names":[],"mappings":"AA2LA,2BAA2B;AAC3B;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,iFAAa,CAAA;IACb,yEAAS,CAAA;AACX,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC;AAED,2BAA2B;AAC3B,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC;;OAEG;IACH,uFAAY,CAAA;IACZ,iFAAS,CAAA;IACT,qFAAW,CAAA;IACX,mFAAU,CAAA;AACZ,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAED,2BAA2B;AAC3B;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,kCAKX;AALD,WAAY,kCAAkC;IAC5C,iGAAW,CAAA;IACX,uGAAc,CAAA;IACd,qGAAa,CAAA;IACb,yGAAe,CAAA;AACjB,CAAC,EALW,kCAAkC,KAAlC,kCAAkC,QAK7C;AAED,cAAc;AACd;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,sCAaX;AAbD,WAAY,sCAAsC;IAChD;;OAEG;IACH,iHAAe,CAAA;IACf;;OAEG;IACH,yGAAW,CAAA;IACX;;OAEG;IACH,iHAAe,CAAA;AACjB,CAAC,EAbW,sCAAsC,KAAtC,sCAAsC,QAajD;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACvC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,yFAAY,CAAA;IACZ;;;OAGG;IACH,uFAAW,CAAA;AACb,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACxC;;OAEG;IACH,qFAAS,CAAA;IACT;;OAEG;IACH,qGAAiB,CAAA;IACjB;;OAEG;IACH,qFAAS,CAAA;AACX,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC","sourcesContent":["import { StyleProp, ViewStyle, ViewProps } from 'react-native';\n\n// @needsAudit\nexport declare type AppleAuthenticationButtonProps = ViewProps & {\n /**\n * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#isavailableasync)\n * in here.\n */\n onPress: () => void;\n /**\n * The type of button text to display (\"Sign In with Apple\" vs. \"Continue with Apple\").\n */\n buttonType: AppleAuthenticationButtonType;\n /**\n * The Apple-defined color scheme to use to display the button.\n */\n buttonStyle: AppleAuthenticationButtonStyle;\n /**\n * The border radius to use when rendering the button. This works similarly to\n * `style.borderRadius` in other Views.\n */\n cornerRadius?: number;\n /**\n * The custom style to apply to the button. Should not include `backgroundColor` or `borderRadius`\n * properties.\n */\n style?: StyleProp<Omit<ViewStyle, 'backgroundColor' | 'borderRadius'>>;\n};\n\n// @needsAudit\n/**\n * The options you can supply when making a call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).\n * None of these options are required.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationSignInOptions = {\n /**\n * Array of user information scopes to which your app is requesting access. Note that the user can\n * choose to deny your app access to any scope at the time of logging in. You will still need to\n * handle `null` values for any scopes you request. Additionally, note that the requested scopes\n * will only be provided to you the first time each user signs into your app; in subsequent\n * requests they will be `null`. Defaults to `[]` (no scopes).\n */\n requestedScopes?: AppleAuthenticationScope[];\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n\n /**\n * An arbitrary string that is used to prevent replay attacks. See more information on this in the\n * [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowSteps).\n */\n nonce?: string;\n};\n\n// @needsAudit @docsMissing\n/**\n * The options you can supply when making a call to [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions).\n * You must include the ID string of the user whose credentials you'd like to refresh.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationRefreshOptions = {\n user: string;\n\n /**\n * Array of user information scopes to which your app is requesting access. Note that the user can\n * choose to deny your app access to any scope at the time of logging in. You will still need to\n * handle `null` values for any scopes you request. Additionally, note that the requested scopes\n * will only be provided to you the first time each user signs into your app; in subsequent\n * requests they will be `null`. Defaults to `[]` (no scopes).\n */\n requestedScopes?: AppleAuthenticationScope[];\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n};\n\n// @needsAudit\n/**\n * The options you can supply when making a call to [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions).\n * You must include the ID string of the user to sign out.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationSignOutOptions = {\n user: string;\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n};\n\n// @needsAudit\n/**\n * The object type returned from a successful call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions),\n * [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions), or [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions)\n * which contains all of the pertinent user and credential information.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidcredential)\n * for more details.\n */\nexport type AppleAuthenticationCredential = {\n /**\n * An identifier associated with the authenticated user. You can use this to check if the user is\n * still authenticated later. This is stable and can be shared across apps released under the same\n * development team. The same user will have a different identifier for apps released by other\n * developers.\n */\n user: string;\n\n /**\n * An arbitrary string that your app provided as `state` in the request that generated the\n * credential. Used to verify that the response was from the request you made. Can be used to\n * avoid replay attacks. If you did not provide `state` when making the sign-in request, this field\n * will be `null`.\n */\n state: string | null;\n\n /**\n * The user's name. May be `null` or contain `null` values if you didn't request the `FULL_NAME`\n * scope, if the user denied access, or if this is not the first time the user has signed into\n * your app.\n */\n fullName: AppleAuthenticationFullName | null;\n\n /**\n * The user's email address. Might not be present if you didn't request the `EMAIL` scope. May\n * also be null if this is not the first time the user has signed into your app. If the user chose\n * to withhold their email address, this field will instead contain an obscured email address with\n * an Apple domain.\n */\n email: string | null;\n\n /**\n * A value that indicates whether the user appears to the system to be a real person.\n */\n realUserStatus: AppleAuthenticationUserDetectionStatus;\n\n /**\n * A JSON Web Token (JWT) that securely communicates information about the user to your app.\n */\n identityToken: string | null;\n\n /**\n * A short-lived session token used by your app for proof of authorization when interacting with\n * the app's server counterpart. Unlike `user`, this is ephemeral and will change each session.\n */\n authorizationCode: string | null;\n};\n\n// @needsAudit @docsMissing\n/**\n * An object representing the tokenized portions of the user's full name. Any of all of the fields\n * may be `null`. Only applicable fields that the user has allowed your app to access will be nonnull.\n */\nexport type AppleAuthenticationFullName = {\n namePrefix: string | null;\n givenName: string | null;\n middleName: string | null;\n familyName: string | null;\n nameSuffix: string | null;\n nickname: string | null;\n};\n\n// @needsAudit @docsMissing\n/**\n * An enum whose values specify scopes you can request when calling [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).\n *\n * > Note that it is possible that you will not be granted all of the scopes which you request.\n * > You will still need to handle null values for any fields you request.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationscope)\n * for more details.\n */\nexport enum AppleAuthenticationScope {\n FULL_NAME = 0,\n EMAIL = 1,\n}\n\n// @needsAudit @docsMissing\nexport enum AppleAuthenticationOperation {\n /**\n * An operation that depends on the particular kind of credential provider.\n */\n IMPLICIT = 0,\n LOGIN = 1,\n REFRESH = 2,\n LOGOUT = 3,\n}\n\n// @needsAudit @docsMissing\n/**\n * An enum whose values specify state of the credential when checked with [`AppleAuthentication.getCredentialStateAsync()`](#appleauthenticationgetcredentialstateasyncuser).\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidprovidercredentialstate)\n * for more details.\n */\nexport enum AppleAuthenticationCredentialState {\n REVOKED = 0,\n AUTHORIZED = 1,\n NOT_FOUND = 2,\n TRANSFERRED = 3,\n}\n\n// @needsAudit\n/**\n * An enum whose values specify the system's best guess for how likely the current user is a real person.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asuserdetectionstatus)\n * for more details.\n */\nexport enum AppleAuthenticationUserDetectionStatus {\n /**\n * The system does not support this determination and there is no data.\n */\n UNSUPPORTED = 0,\n /**\n * The system has not determined whether the user might be a real person.\n */\n UNKNOWN = 1,\n /**\n * The user appears to be a real person.\n */\n LIKELY_REAL = 2,\n}\n\n// @needsAudit\n/**\n * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).\n */\nexport enum AppleAuthenticationButtonType {\n /**\n * \"Sign in with Apple\"\n */\n SIGN_IN = 0,\n /**\n * \"Continue with Apple\"\n */\n CONTINUE = 1,\n /**\n * \"Sign up with Apple\"\n * @platform ios 13.2+\n */\n SIGN_UP = 2,\n}\n\n// @needsAudit\n/**\n * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).\n */\nexport enum AppleAuthenticationButtonStyle {\n /**\n * White button with black text.\n */\n WHITE = 0,\n /**\n * White button with a black outline and black text.\n */\n WHITE_OUTLINE = 1,\n /**\n * Black button with white text.\n */\n BLACK = 2,\n}\n"]}
1
+ {"version":3,"file":"AppleAuthentication.types.js","sourceRoot":"","sources":["../src/AppleAuthentication.types.ts"],"names":[],"mappings":"AA2LA,2BAA2B;AAC3B;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,iFAAa,CAAA;IACb,yEAAS,CAAA;AACX,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC;AAED,2BAA2B;AAC3B,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC;;OAEG;IACH,uFAAY,CAAA;IACZ,iFAAS,CAAA;IACT,qFAAW,CAAA;IACX,mFAAU,CAAA;AACZ,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAED,2BAA2B;AAC3B;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,kCAKX;AALD,WAAY,kCAAkC;IAC5C,iGAAW,CAAA;IACX,uGAAc,CAAA;IACd,qGAAa,CAAA;IACb,yGAAe,CAAA;AACjB,CAAC,EALW,kCAAkC,KAAlC,kCAAkC,QAK7C;AAED,cAAc;AACd;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,sCAaX;AAbD,WAAY,sCAAsC;IAChD;;OAEG;IACH,iHAAe,CAAA;IACf;;OAEG;IACH,yGAAW,CAAA;IACX;;OAEG;IACH,iHAAe,CAAA;AACjB,CAAC,EAbW,sCAAsC,KAAtC,sCAAsC,QAajD;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACvC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,yFAAY,CAAA;IACZ;;;OAGG;IACH,uFAAW,CAAA;AACb,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC;AAED,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACxC;;OAEG;IACH,qFAAS,CAAA;IACT;;OAEG;IACH,qGAAiB,CAAA;IACjB;;OAEG;IACH,qFAAS,CAAA;AACX,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC","sourcesContent":["import { StyleProp, ViewStyle, ViewProps } from 'react-native';\n\n// @needsAudit\nexport declare type AppleAuthenticationButtonProps = ViewProps & {\n /**\n * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#appleauthenticationisavailableasync)\n * in here.\n */\n onPress: () => void;\n /**\n * The type of button text to display (\"Sign In with Apple\" vs. \"Continue with Apple\").\n */\n buttonType: AppleAuthenticationButtonType;\n /**\n * The Apple-defined color scheme to use to display the button.\n */\n buttonStyle: AppleAuthenticationButtonStyle;\n /**\n * The border radius to use when rendering the button. This works similarly to\n * `style.borderRadius` in other Views.\n */\n cornerRadius?: number;\n /**\n * The custom style to apply to the button. Should not include `backgroundColor` or `borderRadius`\n * properties.\n */\n style?: StyleProp<Omit<ViewStyle, 'backgroundColor' | 'borderRadius'>>;\n};\n\n// @needsAudit\n/**\n * The options you can supply when making a call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).\n * None of these options are required.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationSignInOptions = {\n /**\n * Array of user information scopes to which your app is requesting access. Note that the user can\n * choose to deny your app access to any scope at the time of logging in. You will still need to\n * handle `null` values for any scopes you request. Additionally, note that the requested scopes\n * will only be provided to you the first time each user signs into your app; in subsequent\n * requests they will be `null`. Defaults to `[]` (no scopes).\n */\n requestedScopes?: AppleAuthenticationScope[];\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n\n /**\n * An arbitrary string that is used to prevent replay attacks. See more information on this in the\n * [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowSteps).\n */\n nonce?: string;\n};\n\n// @needsAudit @docsMissing\n/**\n * The options you can supply when making a call to [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions).\n * You must include the ID string of the user whose credentials you'd like to refresh.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationRefreshOptions = {\n user: string;\n\n /**\n * Array of user information scopes to which your app is requesting access. Note that the user can\n * choose to deny your app access to any scope at the time of logging in. You will still need to\n * handle `null` values for any scopes you request. Additionally, note that the requested scopes\n * will only be provided to you the first time each user signs into your app; in subsequent\n * requests they will be `null`. Defaults to `[]` (no scopes).\n */\n requestedScopes?: AppleAuthenticationScope[];\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n};\n\n// @needsAudit\n/**\n * The options you can supply when making a call to [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions).\n * You must include the ID string of the user to sign out.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest)\n * for more details.\n */\nexport type AppleAuthenticationSignOutOptions = {\n user: string;\n\n /**\n * An arbitrary string that is returned unmodified in the corresponding credential after a\n * successful authentication. This can be used to verify that the response was from the request\n * you made and avoid replay attacks. More information on this property is available in the\n * OAuth 2.0 protocol [RFC6749](https://tools.ietf.org/html/rfc6749#section-10.12).\n */\n state?: string;\n};\n\n// @needsAudit\n/**\n * The object type returned from a successful call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions),\n * [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions), or [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions)\n * which contains all of the pertinent user and credential information.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidcredential)\n * for more details.\n */\nexport type AppleAuthenticationCredential = {\n /**\n * An identifier associated with the authenticated user. You can use this to check if the user is\n * still authenticated later. This is stable and can be shared across apps released under the same\n * development team. The same user will have a different identifier for apps released by other\n * developers.\n */\n user: string;\n\n /**\n * An arbitrary string that your app provided as `state` in the request that generated the\n * credential. Used to verify that the response was from the request you made. Can be used to\n * avoid replay attacks. If you did not provide `state` when making the sign-in request, this field\n * will be `null`.\n */\n state: string | null;\n\n /**\n * The user's name. May be `null` or contain `null` values if you didn't request the `FULL_NAME`\n * scope, if the user denied access, or if this is not the first time the user has signed into\n * your app.\n */\n fullName: AppleAuthenticationFullName | null;\n\n /**\n * The user's email address. Might not be present if you didn't request the `EMAIL` scope. May\n * also be null if this is not the first time the user has signed into your app. If the user chose\n * to withhold their email address, this field will instead contain an obscured email address with\n * an Apple domain.\n */\n email: string | null;\n\n /**\n * A value that indicates whether the user appears to the system to be a real person.\n */\n realUserStatus: AppleAuthenticationUserDetectionStatus;\n\n /**\n * A JSON Web Token (JWT) that securely communicates information about the user to your app.\n */\n identityToken: string | null;\n\n /**\n * A short-lived session token used by your app for proof of authorization when interacting with\n * the app's server counterpart. Unlike `user`, this is ephemeral and will change each session.\n */\n authorizationCode: string | null;\n};\n\n// @needsAudit @docsMissing\n/**\n * An object representing the tokenized portions of the user's full name. Any of all of the fields\n * may be `null`. Only applicable fields that the user has allowed your app to access will be nonnull.\n */\nexport type AppleAuthenticationFullName = {\n namePrefix: string | null;\n givenName: string | null;\n middleName: string | null;\n familyName: string | null;\n nameSuffix: string | null;\n nickname: string | null;\n};\n\n// @needsAudit @docsMissing\n/**\n * An enum whose values specify scopes you can request when calling [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).\n *\n * > Note that it is possible that you will not be granted all of the scopes which you request.\n * > You will still need to handle null values for any fields you request.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationscope)\n * for more details.\n */\nexport enum AppleAuthenticationScope {\n FULL_NAME = 0,\n EMAIL = 1,\n}\n\n// @needsAudit @docsMissing\nexport enum AppleAuthenticationOperation {\n /**\n * An operation that depends on the particular kind of credential provider.\n */\n IMPLICIT = 0,\n LOGIN = 1,\n REFRESH = 2,\n LOGOUT = 3,\n}\n\n// @needsAudit @docsMissing\n/**\n * An enum whose values specify state of the credential when checked with [`AppleAuthentication.getCredentialStateAsync()`](#appleauthenticationgetcredentialstateasyncuser).\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidprovidercredentialstate)\n * for more details.\n */\nexport enum AppleAuthenticationCredentialState {\n REVOKED = 0,\n AUTHORIZED = 1,\n NOT_FOUND = 2,\n TRANSFERRED = 3,\n}\n\n// @needsAudit\n/**\n * An enum whose values specify the system's best guess for how likely the current user is a real person.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asuserdetectionstatus)\n * for more details.\n */\nexport enum AppleAuthenticationUserDetectionStatus {\n /**\n * The system does not support this determination and there is no data.\n */\n UNSUPPORTED = 0,\n /**\n * The system has not determined whether the user might be a real person.\n */\n UNKNOWN = 1,\n /**\n * The user appears to be a real person.\n */\n LIKELY_REAL = 2,\n}\n\n// @needsAudit\n/**\n * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).\n */\nexport enum AppleAuthenticationButtonType {\n /**\n * \"Sign in with Apple\"\n */\n SIGN_IN = 0,\n /**\n * \"Continue with Apple\"\n */\n CONTINUE = 1,\n /**\n * \"Sign up with Apple\"\n * @platform ios 13.2+\n */\n SIGN_UP = 2,\n}\n\n// @needsAudit\n/**\n * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).\n */\nexport enum AppleAuthenticationButtonStyle {\n /**\n * White button with black text.\n */\n WHITE = 0,\n /**\n * White button with a black outline and black text.\n */\n WHITE_OUTLINE = 1,\n /**\n * Black button with white text.\n */\n BLACK = 2,\n}\n"]}
@@ -5,7 +5,7 @@ import { AppleAuthenticationButtonProps } from './AppleAuthentication.types';
5
5
  * authentication process instead of a custom button. Limited customization of the button is
6
6
  * available via the provided properties.
7
7
  *
8
- * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#isavailableasync)
8
+ * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#appleauthenticationisavailableasync)
9
9
  * resolves to `true`. This component will render nothing if it is not available, and you will get
10
10
  * a warning in development mode (`__DEV__ === true`).
11
11
  *
@@ -7,7 +7,7 @@ import ExpoAppleAuthenticationButton from './ExpoAppleAuthenticationButton';
7
7
  * authentication process instead of a custom button. Limited customization of the button is
8
8
  * available via the provided properties.
9
9
  *
10
- * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#isavailableasync)
10
+ * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#appleauthenticationisavailableasync)
11
11
  * resolves to `true`. This component will render nothing if it is not available, and you will get
12
12
  * a warning in development mode (`__DEV__ === true`).
13
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AppleAuthenticationButton.js","sourceRoot":"","sources":["../src/AppleAuthenticationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAE5E,cAAc;AACd;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,OAAO,EACP,GAAG,SAAS,EACmB;IAC/B,IAAI,CAAC,6BAA6B,EAAE;QAClC,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CAAC,6BAA6B,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC,EAAG,CAAC;AAClF,CAAC","sourcesContent":["import React from 'react';\n\nimport { AppleAuthenticationButtonProps } from './AppleAuthentication.types';\nimport ExpoAppleAuthenticationButton from './ExpoAppleAuthenticationButton';\n\n// @needsAudit\n/**\n * This component displays the proprietary \"Sign In with Apple\" / \"Continue with Apple\" button on\n * your screen. The App Store Guidelines require you to use this component to start the\n * authentication process instead of a custom button. Limited customization of the button is\n * available via the provided properties.\n *\n * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#isavailableasync)\n * resolves to `true`. This component will render nothing if it is not available, and you will get\n * a warning in development mode (`__DEV__ === true`).\n *\n * The properties of this component extend from `View`; however, you should not attempt to set\n * `backgroundColor` or `borderRadius` with the `style` property. This will not work and is against\n * the App Store Guidelines. Instead, you should use the `buttonStyle` property to choose one of the\n * predefined color styles and the `cornerRadius` property to change the border radius of the\n * button.\n *\n * Make sure to attach height and width via the style props as without these styles, the button will\n * not appear on the screen.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton)\n * for more details.\n */\nexport default function AppleAuthenticationButton({\n onPress,\n ...restProps\n}: AppleAuthenticationButtonProps) {\n if (!ExpoAppleAuthenticationButton) {\n if (__DEV__) {\n console.warn(\"'AppleAuthenticationButton' is not available.\");\n }\n return null;\n }\n return <ExpoAppleAuthenticationButton onButtonPress={onPress} {...restProps} />;\n}\n"]}
1
+ {"version":3,"file":"AppleAuthenticationButton.js","sourceRoot":"","sources":["../src/AppleAuthenticationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAE5E,cAAc;AACd;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,OAAO,EACP,GAAG,SAAS,EACmB;IAC/B,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACnC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,6BAA6B,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,SAAS,CAAC,EAAG,CAAC;AAClF,CAAC","sourcesContent":["import React from 'react';\n\nimport { AppleAuthenticationButtonProps } from './AppleAuthentication.types';\nimport ExpoAppleAuthenticationButton from './ExpoAppleAuthenticationButton';\n\n// @needsAudit\n/**\n * This component displays the proprietary \"Sign In with Apple\" / \"Continue with Apple\" button on\n * your screen. The App Store Guidelines require you to use this component to start the\n * authentication process instead of a custom button. Limited customization of the button is\n * available via the provided properties.\n *\n * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#appleauthenticationisavailableasync)\n * resolves to `true`. This component will render nothing if it is not available, and you will get\n * a warning in development mode (`__DEV__ === true`).\n *\n * The properties of this component extend from `View`; however, you should not attempt to set\n * `backgroundColor` or `borderRadius` with the `style` property. This will not work and is against\n * the App Store Guidelines. Instead, you should use the `buttonStyle` property to choose one of the\n * predefined color styles and the `cornerRadius` property to change the border radius of the\n * button.\n *\n * Make sure to attach height and width via the style props as without these styles, the button will\n * not appear on the screen.\n *\n * @see [Apple\n * Documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidbutton)\n * for more details.\n */\nexport default function AppleAuthenticationButton({\n onPress,\n ...restProps\n}: AppleAuthenticationButtonProps) {\n if (!ExpoAppleAuthenticationButton) {\n if (__DEV__) {\n console.warn(\"'AppleAuthenticationButton' is not available.\");\n }\n return null;\n }\n return <ExpoAppleAuthenticationButton onButtonPress={onPress} {...restProps} />;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoAppleAuthenticationButton.js","sourceRoot":"","sources":["../src/ExpoAppleAuthenticationButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,IAAI,6BAAkC,CAAC;AAEvC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;IACzB,6BAA6B,GAAG,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;CACrF;AAED,eAAe,6BAA6B,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nlet ExpoAppleAuthenticationButton: any;\n\nif (Platform.OS === 'ios') {\n ExpoAppleAuthenticationButton = requireNativeViewManager('ExpoAppleAuthentication');\n}\n\nexport default ExpoAppleAuthenticationButton;\n"]}
1
+ {"version":3,"file":"ExpoAppleAuthenticationButton.js","sourceRoot":"","sources":["../src/ExpoAppleAuthenticationButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,IAAI,6BAAkC,CAAC;AAEvC,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;IAC1B,6BAA6B,GAAG,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;AACtF,CAAC;AAED,eAAe,6BAA6B,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nlet ExpoAppleAuthenticationButton: any;\n\nif (Platform.OS === 'ios') {\n ExpoAppleAuthenticationButton = requireNativeViewManager('ExpoAppleAuthentication');\n}\n\nexport default ExpoAppleAuthenticationButton;\n"]}
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '13.0'
13
+ s.platform = :ios, '13.4'
14
14
  s.swift_version = '5.4'
15
15
  s.source = { git: 'https://github.com/expo/expo.git' }
16
16
  s.static_framework = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-apple-authentication",
3
- "version": "6.2.0",
3
+ "version": "6.4.0",
4
4
  "description": "A package that provides 'Sign in with Apple' capability for Expo and React Native apps.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -38,5 +38,5 @@
38
38
  "peerDependencies": {
39
39
  "expo": "*"
40
40
  },
41
- "gitHead": "da25937e2a99661cbe5eb60ca1d8d6245fc96a50"
41
+ "gitHead": "4165b8d72e1b9a1889c2767534cc619e21468110"
42
42
  }
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle, ViewProps } from 'react-native';
3
3
  // @needsAudit
4
4
  export declare type AppleAuthenticationButtonProps = ViewProps & {
5
5
  /**
6
- * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#isavailableasync)
6
+ * The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#appleauthenticationisavailableasync)
7
7
  * in here.
8
8
  */
9
9
  onPress: () => void;
@@ -252,7 +252,7 @@ export enum AppleAuthenticationUserDetectionStatus {
252
252
 
253
253
  // @needsAudit
254
254
  /**
255
- * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
255
+ * An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
256
256
  */
257
257
  export enum AppleAuthenticationButtonType {
258
258
  /**
@@ -272,7 +272,7 @@ export enum AppleAuthenticationButtonType {
272
272
 
273
273
  // @needsAudit
274
274
  /**
275
- * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationappleauthenticationbutton).
275
+ * An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
276
276
  */
277
277
  export enum AppleAuthenticationButtonStyle {
278
278
  /**
@@ -10,7 +10,7 @@ import ExpoAppleAuthenticationButton from './ExpoAppleAuthenticationButton';
10
10
  * authentication process instead of a custom button. Limited customization of the button is
11
11
  * available via the provided properties.
12
12
  *
13
- * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#isavailableasync)
13
+ * You should only attempt to render this if [`AppleAuthentication.isAvailableAsync()`](#appleauthenticationisavailableasync)
14
14
  * resolves to `true`. This component will render nothing if it is not available, and you will get
15
15
  * a warning in development mode (`__DEV__ === true`).
16
16
  *