EN
Lesson 3.2Pro - Part of Agentic School Pro

Clerk: Authentication and OAuth from Dev to Production

Add real authentication with Clerk, wire up Google OAuth, and take it from a dev instance to a production instance on your own domain

30 min•The Modern App Stack - Auth, Data and Payments•Available

What you learn

  • What OAuth is conceptually and why you must never hand-roll authentication
  • Adding Clerk and the difference between a development instance and a production instance
  • A full Google OAuth production walkthrough: consent screen, credentials and custom-domain DNS records

Summary

Your app now needs users: people who sign up, log in, and have their own data. That is authentication, and it is a place where a small mistake leaks every customer password you hold. The right move in 2026 is unambiguous: do not build it yourself, use a service. Clerk is that service for most of the builders this course is for. This lesson explains the one concept you must understand (OAuth), gets Clerk into your app, and then takes you through the part everyone finds fiddly - going from development keys to a real production instance with Google sign-in on your own domain.

What you will learn

You will learn what OAuth is in plain language, why hand-rolling auth is a trap that even large companies fall into, how Clerk fits your app, the crucial difference between a development instance and a production instance, and the exact steps to enable Google OAuth in production, including the Google consent screen, credentials, and the DNS records that make it run on your domain.

Prerequisites

A working app from Course 1 and the architecture map from the previous lesson, since auth lives on the app side, not the marketing site. You also need the secrets discipline from Course 1: auth keys are highly sensitive and must never be committed. The next lesson on secrets goes deeper, but the basic rule (keys in .env, .env in .gitignore) must already be second nature.

The problem

Building auth yourself sounds like a rite of passage. It is actually a minefield. You have to hash and salt passwords correctly, manage sessions and tokens, handle password resets, defend against credential stuffing and brute force, store everything securely, and keep up with new attack techniques forever. Get one detail wrong and you leak customer data, which is a legal and reputational disaster. Meanwhile your competitors using Clerk shipped login in an afternoon and moved on to building their actual product. There is no prize for the hand-rolled version. This is a solved problem, and your job is to use the solution, not reinvent it.

Unlocking your Pro lesson

Comments

Loading comments.

Post a comment
CommentsNext
Next step

Ready to put AI to work as a real workflow?

Start with the foundations course, keep your progress locally and sync everything to your free account whenever you like.