Connecting the outside world

Your notes app has real users. Sign up, log in, see only your own data — it all works. But hand the URL to a friend and it falls apart — verification emails are never sent, just printed in a terminal they can't see.

That's the first thing to fix. Without real email delivery, the signup and password reset flows you built in Chapter 6 don't work for anyone but you. Once email works, you'll add OAuth — Google and GitHub — so users can sign in without creating a password at all.

This chapter is mostly dashboard work. You'll spend your time in Google Cloud Console, GitHub Developer Settings, Turso, and Vercel — plus a quick email setup (Gmail SMTP). The code is already in the starter but disabled. Your job is to flip it on.

Login with OAuth

Integration work

Up to now, every chapter has been about building features — routes, forms, database tables, user accounts. This chapter is different. You won't write much code. Instead, you'll configure external services and wire them into your app with environment variables.

Each integration adds something visible and testable. A real email arrives in your inbox. The Google button appears. The GitHub button works. The deploy page is the victory lap.

?What is OAuth?

Here's the plan

  1. Send real emails — Replace console-printed links with real email delivery
  2. Set up Google OAuth — Create credentials in Google Cloud Console, uncomment one line, test
  3. Set up GitHub OAuth — Same pattern, different dashboard
  4. Ship it — Create a production database, add env vars and callback URLs, deploy
  5. Wrap up — Celebrate what you shipped

By the end, anyone with a browser can sign up for your app — with Google, GitHub, or email — and receive real verification emails. Let's start with email.