Sign In with GitHub and Firebase Auth | React Native Expo 49 | TypeScript
Beto, August 12, 2023 · 5,664 views
If your app is built for developers, GitHub sign-in is the login they actually want. I build the full flow in the video with Firebase Auth, Expo SDK 49, TypeScript, and Expo Router: OAuth app setup on GitHub, provider config in Firebase, and the token exchange code that ties it together. Sessions persist across restarts, and it runs on both iOS and Android emulators.
You'll also see how to keep your client ID and secret out of source control with environment variables.
What's inside
- Create a GitHub OAuth app and grab the client ID and secret
- Enable the GitHub provider in Firebase Authentication
- Handle the OAuth redirect and exchange the code for a token in TypeScript
- Keep credentials safe with a file in Expo
- Persist sessions and wire up clean sign-out behavior
- Request extra GitHub scopes beyond basic auth, like repo access
Resources

CourseReact Native course
Go deeper in the Expo Router section: 115 minutes on auth flows, routing, and deep linking.
Had a win? Get featured on Code with Beto.Share your story
Like this article? Get the rest of the library plus weekly React Native tips. Free.