NewCode with Beto MCP

React Native Expo Local Authentication | Face ID | Touch ID | Passcode 2022

Beto, March 17, 2022 · 20,440 views

Face ID makes an app feel legit, and users trust it more than any password field you could build yourself. Expo gives you the native prompt with one package and one method call. In the video I build a login screen that unlocks a payment screen with Face ID, Touch ID, or the device passcode.

What's inside

  • Installing expo-local-authentication and react-native-svg
  • Checking device support with hasHardwareAsync
  • Triggering the native prompt with authenticateAsync
  • Custom prompt messages and a passcode fallback label
  • Auth state with hooks deciding which screen renders
  • A reusable SVG payment card component for the UI

Resources

CourseReact Native course

Let's connect!

Had a win? Get featured on Code with Beto.Share your story