79540337

Date: 2025-03-28 01:28:10
Score: 1
Natty:
Report link

You can’t directly generate an ID or token from the fingerprint due to privacy restrictions. Instead, use the local_auth package to verify the user’s fingerprint locally on the device. After the user logs in once using a traditional method (like email/password), generate a Firebase custom token (via a server or Firebase Admin SDK) and save it securely on the device using flutter_secure_storage. For subsequent logins, when the fingerprint scan succeeds, retrieve this stored token and use Firebase’s signInWithCustomToken method to authenticate the user and access the app. This approach is practical, secure, and works well, though it requires an initial setup with a non-fingerprint login to associate the token with the user’s account.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Harsh Patel