Want users to sign in to your app? With itsalive.co, authentication is built in. Users enter their email, click a link, and they're logged in. No password management, no OAuth setup.
Prerequisite: Run npx itsalive in your project first. This creates an ITSALIVE.md file that teaches Claude how to use the auth APIs.
How It Works
- User enters their email
- We send them a magic link
- They click the link
- They're logged in with a session cookie
Tell Claude What You Need
Just describe the authentication behavior you want. Here are some examples:
Basic Login
Ask Claude:
"Add a login page to my app. Show an email input field and a
'Send Login Link' button. When they submit, send a magic link
to their email. Show a message telling them to check their inbox."
Login with Redirect
Ask Claude:
"Add login to my app. If the user isn't logged in, show a login
form. After they log in, redirect them to the dashboard page.
Show their email in the header when they're logged in."
Protected Content
Ask Claude:
"Make the app require login. If someone visits without being
logged in, show the login page. Once logged in, show the main
app. Add a logout button in the corner."
User Profile
Ask Claude:
"Add a user profile section that shows the logged-in user's
email. Include a logout button that signs them out and returns
to the login page."
Example Apps with Authentication
Personal Journal
Ask Claude:
"Build a personal journal app. Users need to log in first.
Once logged in, they can write journal entries with a title
and content. Each user only sees their own entries. Save
entries to the database. Add a logout button."
Bookmarks Manager
Ask Claude:
"Create a bookmarks app where users save links they want to
remember. Require login so each person has their own bookmarks.
Let them add a URL and title, and organize into folders.
Show their email in the header with a logout option."
Expense Tracker
Ask Claude:
"Build an expense tracker. Users log in with their email,
then can add expenses with amount, category, and date.
Show a monthly summary and total. Each user's expenses
are private to them. Include logout functionality."
What Claude Knows
When you deploy with itsalive, Claude automatically knows:
- How to trigger login: Send email to the magic link endpoint
- How to check auth: See if the user is logged in
- How to get user info: Retrieve the logged-in user's email and ID
- How to log out: Clear the user's session
- Data scoping: User data is automatically private to each user
Tips
- Describe the flow: Tell Claude what happens before and after login
- Mention the UI: Say where you want login buttons, user info, etc.
- Think about states: What does a logged-out user see vs. a logged-in user?
- Ask for polish: "Show a loading spinner while checking login status"
Next Steps
- Store user data with the database API
- Add AI features to your authenticated app
- Add a custom domain for a professional look