expo-apple-authentication 6.4.0 → 6.4.1
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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppleAuthentication.js","sourceRoot":"","sources":["../src/AppleAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,EAGL,4BAA4B,GAI7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,cAAc;AACd;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,CAAC,uBAAuB,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,EAAE
|
|
1
|
+
{"version":3,"file":"AppleAuthentication.js","sourceRoot":"","sources":["../src/AppleAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,EAGL,4BAA4B,GAI7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,cAAc;AACd;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,CAAC,uBAAuB,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,EAAE;QACzE,OAAO,KAAK,CAAC;KACd;IACD,OAAO,uBAAuB,CAAC,gBAAgB,EAAE,CAAC;AACpD,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA0C;IAE1C,IAAI,CAAC,uBAAuB,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE;QACrE,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE,aAAa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G;QACrB,GAAG,OAAO;QACV,kBAAkB,EAAE,4BAA4B,CAAC,MAAM;KACxD,CAAC;IACF,OAAO,uBAAuB,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;AAC9D,CAAC;AAED,cAAc;AACd;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAY;IAEZ,IAAI,CAAC,uBAAuB,IAAI,CAAC,uBAAuB,CAAC,uBAAuB,EAAE;QAChF,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE,yBAAyB,CAAC,CAAC;KACvF;IACD,OAAO,uBAAuB,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,mCAAmC,GAAG,IAAI,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAEtF,eAAe;AACf,MAAM,UAAU,iBAAiB,CAAC,QAAoB;IACpD,OAAO,mCAAmC,CAAC,WAAW,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC;AACpG,CAAC","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 +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
|
|
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()`](#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
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-apple-authentication",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.1",
|
|
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": "
|
|
41
|
+
"gitHead": "ee4f30ef3b5fa567ad1bf94794197f7683fdd481"
|
|
42
42
|
}
|