Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 2.21 KB

_lib_index_d_.rnappleauth.appleauthrealuserstatus.md

File metadata and controls

80 lines (49 loc) · 2.21 KB

Enumeration: AppleAuthRealUserStatus

Possible values for the real user indicator.

url https://developer.apple.com/documentation/authenticationservices/asuserdetectionstatus

What is it?

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) {

  }
}

Index

Enumeration members

Enumeration members

LIKELY_REAL

LIKELY_REAL:

Defined in lib/index.d.ts:165

A hint that there's high confidence that the user is real.


UNKNOWN

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

UNSUPPORTED:

Defined in lib/index.d.ts:152

Not supported on current platform, ignore the value.