📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

@invertase/react-native-apple-authentication

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invertase/react-native-apple-authentication - npm Package Compare versions

Comparing version

to
2.3.0

4

CHANGELOG.md

@@ -8,2 +8,6 @@ <!-- markdownlint-disable MD024 MD034 MD033 -->

**UNINTENTIONAL BREAKING CHANGE**: older android build toolchains, as are in use in react-native 0.66 and below, require kotlinVersion = "1.6.21" in your android/build.gradle ext block to compile. Sorry for the hassle. See https://github.com/invertase/react-native-apple-authentication/issues/297
## 2.2.1

@@ -10,0 +14,0 @@ - fix(android, build): remove jcenter from build repo list (#281) (thanks @maheshwarimrinal!)

5

lib/AppleButton.android.js

@@ -19,2 +19,3 @@ import React from 'react';

leftView,
buttonText,
} = props;

@@ -34,2 +35,4 @@

const text = buttonText ? buttonText : ButtonTexts[buttonType];
return (

@@ -39,3 +42,3 @@ <TouchableOpacity onPress={onPress} activeOpacity={0.8} style={_buttonStyle}>

{!!leftView && leftView}
<Text style={_textStyle}>{ButtonTexts[buttonType]}</Text>
<Text style={_textStyle}>{text}</Text>
</View>

@@ -42,0 +45,0 @@ </TouchableOpacity>

@@ -115,2 +115,7 @@ /**

/**
* Android-only. Custom button text.
*/
buttonText?: string;
onPress: (event: GestureResponderEvent) => void;

@@ -117,0 +122,0 @@ }

// Generated by genversion.
module.exports = '2.2.2';
module.exports = '2.3.0';
{
"name": "@invertase/react-native-apple-authentication",
"version": "2.2.2",
"version": "2.3.0",
"author": "Invertase <oss@invertase.io> (http://invertase.io)",

@@ -13,13 +13,14 @@ "description": "A complete Apple Authentication services API for React Native iOS apps.",

"build:all": "yarn build:clean && yarn build && yarn example:build:android && yarn example:build:ios",
"build:clean": "rimraf ios/build android/build example/android/app/build example/ios/build",
"build:clean": "rimraf ios/build android/build example/android/app/build example/ios/build example/macos/build",
"build:docs": "typedoc --excludeExternals --out typedocs --plugin typedoc-plugin-markdown --hideBreadcrumbs --entryPoints lib/index.d.ts",
"precommit": "yarn prepare && yarn build:all",
"prepare": "yarn build && yarn tsc:compile && yarn example:prepare",
"example:prepare": "cd example && yarn && yarn pod-install",
"example:prepare": "cd example && yarn && cd ios && (pod install || true) && cd ../macos && (pod install || true)",
"example:build:android": "cd example/android && ./gradlew assembleDebug",
"example:build:ios": "cd example && (xcodebuild -workspace ios/testing.xcworkspace -scheme testing -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES || true)",
"example:build:ios": "cd example && (xcodebuild -workspace ios/RNAppleAuthExample.xcworkspace -scheme RNAppleAuthExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcbeautify || true)",
"example:build:macos": "cd example && (xcodebuild -workspace macos/RNAppleAuthExample.xcworkspace -scheme RNAppleAuthExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES | xcbeautify || true)",
"example:start": "cd example && yarn start",
"example:ios": "cd example && yarn run:ios",
"example:ios13": "cd example && yarn run:ios13",
"example:android": "cd example && yarn run:android",
"example:ios": "cd example && yarn ios",
"example:macos": "cd example && yarn macos",
"example:android": "cd example && yarn android",
"shipit": "echo no luck running it like this, try ./node_modules/.bin/np"

@@ -46,17 +47,20 @@ },

"devDependencies": {
"@react-native-community/eslint-config": "^3.0.2",
"@types/react": "17.0.39",
"@types/react-native": "0.67.7",
"@react-native/eslint-config": "^0.74.0",
"@types/react": "18.2.34",
"genversion": "^3.1.1",
"np": "^7.6.1",
"prettier": "^2.6.2",
"react-native": "^0.67.3",
"rimraf": "^3.0.2",
"np": "^8.0.4",
"prettier": "^3.0.3",
"react-native": "^0.72.6",
"react-native-test-app": "^2.5.32",
"rimraf": "^5.0.5",
"typedoc": "^0.22.15",
"typedoc-plugin-markdown": "^3.12.1",
"typescript": "^4.6.4"
"typescript": "^5.0.4"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14"
}
}

@@ -103,3 +103,4 @@ <p align="center">

requestedOperation: appleAuth.Operation.LOGIN,
requestedScopes: [appleAuth.Scope.EMAIL, appleAuth.Scope.FULL_NAME],
// Note: it appears putting FULL_NAME first is important, see issue #293
requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL],
});

@@ -309,2 +310,9 @@

- Apple only returns the `full name` and `email` on the first login, it will return `null` on the succeeding login so you need to save those data.
- Apple APIs [appear to be sensitive to the order you place the scopes in the auth request](https://github.com/invertase/react-native-apple-authentication/issues/293). Place first name *first*, like this:
```javascript
const appleAuthRequestResponse = await appleAuth.performRequest({
requestedOperation: appleAuth.Operation.LOGIN,
requestedScopes: [appleAuth.Scope.FULL_NAME, appleAuth.Scope.EMAIL],
});
```
- For testing purposes, to be receive these again, go to your device settings; `Settings > Apple ID, iCloud, iTunes & App Store > Password & Security > Apps Using Your Apple ID`, tap on your app and tap `Stop Using Apple ID`. You can now sign-in again and you'll receive the `full name` and `email.

@@ -311,0 +319,0 @@ - Keep in mind you can always access the `email` property server-side by inspecting the `id_token` returned from Apple when verifying the user.

Sorry, the diff of this file is not supported yet