You picked hosted sign-in. Now the Python API has to believe it.
The client can show a login screen in an afternoon. The hard part is everything after that. The browser holds a session. Your API still has to reject bad tokens, return something useful when the token is good, and leave public routes open. You read the docs twice and you are still guessing where each piece lives.
FastAPI Nextjs Clerk Starter is a working split stack you can clone and extend.
Sign in once. The API checks the token.
What you get
- A full sign-up and sign-in flow handled by your auth provider, with tokens your API can verify.
- Public and protected endpoints on the Python side so you can see the difference in one running app.
- A dashboard that proves the loop by fetching a token, calling both kinds of routes, and showing personalized data when access is allowed.
- Unauthorized errors handled in the UI so you are not left staring at a silent failure.
- Light and dark themes that follow system preference, plus automatic route protection and redirects.
- Both apps orchestrated for local work so the browser client and Python API start together without manual juggling.
- Free and open source under the MIT licence.
Your first morning after cloning
An illustrative case: you create a Clerk project, copy the sample env values the README lists for client and backend, and bring the stack up. You open the app in the browser, create an account, land on the dashboard, and see content that only appears when the API accepts your token. You hit a protected route without signing in and get sent back to login. That is the shape of the product you are building, already wired.
Ready to try it?
- See it on GitHub for setup steps, env samples, and nested READMEs for client and backend














