[React-Native] Expo 생체인증

kk_jang93·2024년 7월 12일
0
👀 Google Android 공식 가이드
https://developer.android.com/training/sign-in/biometric-auth?hl=ko

$ npm i --save react-native-touch-id

or

$ yarn add react-native-touch-id

===> 해당 라이브러리 확인 결과 업데이트가 19년 이후로 없어서 Android 10 이상에서 지원 **불가**

===========================================================================

Android SDK 10 이상 지원 가능
Expo SDK 40 부터 지원 가능

$ expo install expo-local-authentication

// Expo 공식 문서 가이드
https://docs.expo.dev/versions/latest/sdk/local-authentication/

// Github 참고 가이드
https://github.com/expo/expo/tree/main/packages/expo-local-authentication

SecurityLevel {
	NONE ,      # 등록된 지문 없음
	SECRET ,    # 비 생체 인증 (ex. PIN , 패턴 )
	BIOMETRIC   # 생체 인증
}
NONE = 0 , SECRET = 1 , BIOMETRIC = 2

AuthenticationType { 
	FINGERPRINT ,      # 지문
	RECOGNITION ,      # 얼굴인식
	IRIS (Android 전용) # 홍채인식
}

FINGERPRINT = 1 , RECOGNITION = 2 , IRIS = 3

// 생체인증 참고 레퍼런스
https://dev.to/bionicjulia/biometric-authentication-in-react-native-with-expo-3l20

// 최근 업데이트 기준 npm
https://www.npmjs.com/package/expo-local-authentication

// React-Native Auth 참고 레퍼런스
https://medium.com/swlh/how-to-use-face-id-with-react-native-or-expo-134231a25fe4
profile
앱개발을 사랑하는 개발자

0개의 댓글