Urgent.News

What's breaking now, across thousands of outlets.

Tech

Expo + Supabase GitHub Auth Broke 3 Times — Here's the Fix

TL;DR: GitHub login in my Expo app broke three separate times. A deep link that went nowhere. A PKCE flow I wired backwards. A redirect URL with a typo. Each fix is copy-pasteable below. Total auth code is under a hundred lines. Steal it. Auth is the worst part of every app. Nobody downloads your app for the login screen. They tolerate it. Every minute you spend on OAuth is a minute nobody will…

Expo app developers using Supabase for GitHub authentication encountered three distinct issues over the course of three days. The first problem was that the deep link failure occurred when GitHub redirected to a URL that could not reopen the app. This issue was caused by a problem with the redirect URL in Supabase, which registered the wrong URL for the landing page on mobile devices. The fix involved registering the app's scheme as the redirect URL and updating both Supabase and GitHub settings accordingly.

The second issue stemmed from the developer's incorrect implementation of PKCE (Proof Key for Code Exchange) in the mobile OAuth flow. By generating the verifier and discarding it, the app failed to exchange the returned code for a session, as Supabase required the original verifier to be present during the exchange. The correction was to let the Supabase client handle the entire flow, exchanging the code for a session with just one call.

The third problem was a tiny redirect URL typo that only manifested on Android devices. The problem arose because Android verified app links against the package name, and the developer had renamed the package halfway through the project, causing inconsistencies between the Supabase redirect list and the project's configuration. The solution was to update the redirect URL in the Supabase dashboard and rebuild the Android APK.

To avoid these pitfalls, the developer recommends the following checklist:

1. Use your app's scheme as the redirect URL everywhere - Supabase, GitHub OAuth app, and your code.

2. Ensure that one library owns the entire OAuth flow, with signInWithOAuth initiating the flow and exchangeCodeForSession concluding it.

3. After renaming any elements, search your entire project for the old name, checking package names, bundle IDs, schemes, and redirect URLs.

4. Test the authentication process on a real device early on, as iOS and Android simulators may not fully replicate the issues encountered in the wild.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I Built a PR Inbox for My Phone So I Stop Being the Bottleneck

TL;DR: I was the bottleneck on every pull request. Reviews waited days for me. So I built a PR inbox for my phone. AI summarizes each diff. I swipe right to approve. Built with Expo and Supabase.

  • Author built a PR inbox app for their phone to stop being a bottleneck.
  • App uses Expo, Supabase, GitHub webhooks, and Vercel for free stack.
  • Median review time dropped from three days to under four hours after implementation.

I Ship Mobile Apps for $0: Vercel + Render + Supabase Free Tier

TL;DR: My entire mobile stack costs $0 a month. Expo builds the app. Supabase holds data and auth. Render runs background jobs. Vercel hosts the landing page. Free tiers cover all of it.

  • Ship mobile app using Expo for app building and OTA updates
  • Host landing page on Vercel with 100GB bandwidth and SSL
  • Manage data and authentication with Supabase free tier

Why Static Mock APIs Aren't Enough for Modern Frontend Development

Every frontend developer has experienced this sequence: You start building an interactive web application. The backend is not yet ready, so you connect to a popular free mock API like JSONPlaceholder…

  • Static mock servers provide stateless echo responses.
  • Modern frontend development faces issues with static mocks.
  • Stateful session-based mocks preserve mutations across requests.

More from Saturday 12 September →