Authentication is one of those features every app needs and almost nobody enjoys building. Passwords, sessions, email verification, social logins, password resets β each one is a small project, and each one is a security risk if you get it wrong. Clerk is a hosted service that handles all of it, so you can add sign-in to your app in an afternoon.
Clerk gives you ready-made sign-in and sign-up components, user management, social logins (Google, GitHub, and more), and multi-factor authentication. Your app talks to Clerk's API, and Clerk stores the sensitive parts β passwords and tokens β so you never have to.
Here is how simple it looks in a React app:
import { SignedIn , SignedOut , SignInButton , UserButton } from "@clerk/clerk-react" ;
export default function Header ( ) { return ( < header > < SignedOut > < SignInButton /> </ SignedOut > < SignedIn > < UserButton /> </ SignedIn > </ header > ) ; }
Enter fullscreen mode
Exit fullscreen mode
That is the whole sign-in flow.β¦