Add user authentication to my app
By VibeCoderHQ|Published on 8/2/2025
PromptingNext.jsSaas
Use this when you need real login and signup instead of a fake demo gate. Works in Cursor, Claude Code, Lovable, and v0. Swap in your framework and auth provider, and the two-step plan (packages plus env vars, then file list) stops the AI from silently assuming a setup you do not have.
Prompt Text
Add complete user authentication to my [FRAMEWORK, e.g. Next.js App Router] app using [AUTH PROVIDER, e.g. Supabase Auth / Clerk / NextAuth].
Requirements:
- Email and password sign up, log in, and log out.
- [Optional] Google and GitHub social login.
- Email verification on sign up and a password reset flow.
- A protected route or page group that only logged-in users can see. Redirect logged-out users to /login.
- A reusable way to read the current user on both the server and the client.
- Store the session securely (httpOnly cookies, not localStorage).
Before writing code, do this:
1. Tell me exactly which packages to install and which environment variables I need to set, and where each value comes from.
2. List every file you will create or change with a one-line reason.
Then implement it. Keep the UI minimal but clean, show clear error messages on failed login, and add loading states on the buttons. After you finish, give me a short checklist to test that sign up, login, logout, and the protected route all work.Join the vibe coder community
Weekly prompts, tools, and success stories to help you build and monetize with AI.
Unsubscribe any time.
Reviews
No reviews yet. Be the first to review!