Possible values for the real user indicator.
url
https://developer.apple.com/documentation/authenticationservices/asuserdetectionstatus
This is an exported member, AppleAuthRealUserStatus
from the react-native-apple-authentication
library. This is used to
check the likelihood that a appleAuth.performRequest(requestObject)
was made by the actual user.
import appleAuth, {
AppleAuthRequestOperation,
AppleAuthRequestScope,
AppleAuthRealUserStatus,
} from '@invertase/react-native-apple-authentication';
async function onPressAppleButton() {
const requestOptions = {
requestedOperation: AppleAuthRequestOperation.LOGIN,
requestedScopes: [AppleAuthRequestScope.EMAIL, AppleAuthRequestScope.FULL_NAME],
};
const { realUserStatus } = await appleAuth.performRequest(requestOptions);
if (realUserStatus === AppleAuthRealUserStatus.LIKELY_REAL) {
console.log("I'm probably a real person!");
}
if (realUserStatus === AppleAuthRealUserStatus.UNKNOWN) {
}
if (realUserStatus === AppleAuthRealUserStatus.UNSUPPORTED) {
}
}
• LIKELY_REAL:
Defined in lib/index.d.ts:165
A hint that there's high confidence that the user is real.
• UNKNOWN:
Defined in lib/index.d.ts:160
Could not determine the value.
New users in the ecosystem will get this value as well, so you should not blacklist but instead treat these users as any new user through standard email sign up flows
• UNSUPPORTED:
Defined in lib/index.d.ts:152
Not supported on current platform, ignore the value.