NewCode with Beto MCP

Sign In with Google | React Native Expo Tutorial

Beto, August 21, 2023 · 9,756 views

There's a way to add Google sign-in to your Expo app without touching native SDKs or fighting complicated permissions. Open a WebView, let the user pick their Google account on Google's own page, and come back with a token. In the video I build it step by step and use that token to pull the user's name, email, and photo into the app.

I also explain how to persist the session so people aren't signing in every single launch, and the whole project is free on codewithbeto.dev.

What's inside

  • Add Google sign-in with a WebView, no native SDK setup
  • Let Google's official page handle account selection and security
  • Fetch the user's name, email, and profile photo with the token
  • Persist the session locally so users stay signed in
  • Track auth state to show the right screens
  • Grab the full source code free on codewithbeto.dev

Resources

CourseReact Native course

Let's connect!

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