• Writing
  • Work
  • Activity
  • Contact

Mike Garite

ok@mikeg.meResume
  • GitHub (opens in a new tab)
  • LinkedIn (opens in a new tab)
Writing/Engineering

One-Tap Sign-In and Fingerprint Lock

The 70x7 Android app uses the Google account already on the phone. One tap to sign in, fingerprint to unlock, PIN as fallback. Here's how I built it.

November 27, 20264 min read

The 70x7 Android app uses the Google account already on the phone. One tap, and you're in. Leave the app, and it locks. Come back, and it unlocks with a fingerprint or a PIN. The session stays alive. The screen stays protected.

Here's how I built it, what matters, and where it works.

Why one-tap matters#

Typing an email and password on a phone is friction. Remembering which password you used is friction. Resetting it when you forget is friction. Every step of friction is a reason not to open the app.

One-tap sign-in removes the friction. The phone already knows who you are. The account is already there. The app asks for permission, the user taps yes, and they're in.

That's not just faster. It's more secure. No password to reuse. No password to phish. No password to forget.

How one-tap works#

One-tap sign-in is a native Google API. It's not available from a web page. The native shell calls the API, gets a credential, and passes it to the web console in the WebView.

The flow looks like this:

  1. User opens the app. The native shell checks if there's a session token. If there is, the app loads the console directly. If not, it shows the sign-in screen.
  2. The sign-in screen has one button: "Sign in with Google." Tap it, and the native shell calls the Google Identity Services API.
  3. The API shows a bottom sheet with the Google accounts on the phone. The user picks one and taps yes.
  4. The API returns an ID token. The native shell sends it to the web console's auth endpoint. The endpoint validates the token, creates a session, and returns a session cookie.
  5. The native shell stores the session cookie and loads the console. The user is in.

The whole flow takes about two seconds. No typing. No forms. No passwords.

Why fingerprint lock matters#

The session stays alive between app opens. That means the user doesn't have to sign in every time. But it also means the app needs to protect the session when the phone is left unattended.

Fingerprint lock solves that. When the user leaves the app, the native shell locks it. When they come back, the shell shows a lock screen. Unlock with a fingerprint or a PIN, and the console loads. The session is still there. The screen is protected.

This isn't about distrusting the user. It's about protecting the session when the phone is left on a table, handed to someone else, or lost.

How fingerprint lock works#

Android has a BiometricPrompt API. It handles fingerprint, face unlock, and PIN fallback automatically. You don't have to build the UI. You just call the API.

The lock flow looks like this:

  1. User leaves the app. The native shell detects that the app went to the background (via onPause). It sets a flag: locked = true.
  2. User returns to the app. The native shell detects that the app came to the foreground (via onResume). If locked = true, it shows the BiometricPrompt: "Unlock 70x7."
  3. User unlocks with a fingerprint or a PIN. The BiometricPrompt validates the credential. If it succeeds, the native shell sets locked = false and shows the console. If it fails, the app stays locked.

The session cookie is still there. The console state is still there. The lock screen is just a gate. It doesn't destroy anything. It just protects what's already loaded.

Where PIN fallback matters#

Not every phone has a fingerprint sensor. Not every user trusts biometrics. Some users just prefer a PIN.

The BiometricPrompt API handles fallback automatically. If fingerprint fails, it offers PIN. If PIN is set but fingerprint isn't enrolled, it goes straight to PIN. If neither is set, it falls back to device credentials (the same unlock the phone uses).

That means I don't have to build separate flows for each. The API does it. I just call it.

What I learned#

Don't cache the credential. An early version cached the Google credential in the app's local storage. That was a mistake. If the credential expires, the app breaks. If the user signs out on web, the app stays signed in. If the user revokes the credential, the app can't tell. The fix was to cache the session cookie, not the credential. The session cookie expires. The auth endpoint validates it. If it's invalid, the user signs in again.

Lock on pause, not on background. Another early version locked the app only when it went fully to the background (via onStop). That meant the lock screen didn't show when the user switched apps and came back quickly. The fix was locking on onPause, which triggers as soon as the app loses focus.

Test on a phone without biometrics. DevTools doesn't simulate the BiometricPrompt. You have to test on a real phone. The first time I tested on a phone without a fingerprint sensor, the prompt failed silently. The fix was setting setAllowedAuthenticators to include both biometrics and device credentials.

The takeaway#

One-tap sign-in and fingerprint lock aren't hard to build. They're a day of work, maybe two. But they change how the app feels. No passwords. No typing. One tap to sign in, one touch to unlock. That's the standard, and there's no reason not to meet it.

If you're building a mobile app, use the APIs the platform gives you. They're faster, more secure, and more reliable than anything you'll build yourself.

Tagged

  • Product
  • Security
  • Front-end
← PreviousWrapping the Web Instead of Rebuilding NativeNext →Cassandra: Voice with Tools

Related

  1. November 24, 2026·Engineering

    Wrapping the Web Instead of Rebuilding Native→

    The 70x7 Android app wraps the real web console in a native shell. One codebase, full-screen, with native sign-in, tabs, and push notifications. Here's why I built it this way.

    Product · Architecture · Front-end4 min read

  2. November 9, 2026·Design

    Talk to the Agent While It Works→

    Cursor and Google both shipped two-way voice for coding agents in the same week. The interesting part is not speech. It is what the interface has to become when an agent runs for a long time.

    Agents · AI · Design systems · Front-end3 min read

  3. October 24, 2026·Design

    Agent UI Matters as Much as the Schema→

    Persistent bots force a different interface: roster, presence, a computer of their own, and answers that are not always prose. The product primitives are becoming as important as the data model underneath.

    Agents · AI · Design systems · Front-end3 min read