hackhaton-space-stackHackhaton Space Stack
AcademyBuilder
Get Started
All terms
The Basics
  • Stack
  • Frontend & Backend
  • CLI
  • Monorepo
  • Server
  • Localhost
How AI Works
  • Context Window
  • Hallucination
  • Token
  • Prompt Caching
  • Session
  • Compaction
  • Embedding
  • Vector Database
  • RAG
  • Fine-tuning
  • Temperature
  • Inference
  • Reasoning
  • Multimodal
Building With AI
  • Agent
  • MCP
  • System Prompt
  • Skill
  • CLAUDE.md
  • Slash Command
  • Harness
  • Computer Use
  • Agents SDK
  • Voice Agents
  • OAuth
  • Vibe Coding
  • Permission Scope
  • Tool Calling
  • Prompt Injection
  • Eval
  • Guardrails
  • Sandbox
  • Progressive Disclosure
Code & Collaboration
  • Git
  • Commit
  • Branch
  • GitHub
  • Pull Request
  • Open Source
  • Markdown
  • Dependency
  • Merge
  • Fork
APIs & Connections
  • API
  • Auth
  • Database
  • ORM
  • SDK
  • Webhook
  • Endpoint
  • REST
  • HTTP Methods
  • Env File
  • Schema
  • JSON
  • YAML
  • Secret
  • Rate Limit
  • CORS
  • Cookie
  • Encryption
Shipping & Running
  • Deploy
  • Headless
  • Cron
  • DNS
  • CDN
  • Object Storage
  • Serverless
  • Edge
  • Worker
  • Runtime
  • Process
  • Daemon
  • Queue
  • Job
  • State
  • Cache
  • SSH
  • Build
  • Staging
  • Rollback
  • Docker
  • Feature Flag
  • Test
  • CI/CD
  • The Cloud
Debugging & Errors
  • Trace
  • Type Error
  • Stack Trace
  • Log
  • Bug
  • Patch
  • Latency
How Developers Think
  • DRY
  • YAGNI
  • KISS
  • Refactoring
  • Technical Debt
  • Async
← All terms

Type-safe, modern TypeScript scaffolding for full-stack web development

ThreadsGitHub

Info

  • Academy
  • Docs

Legal

  • Terms of Service
  • Privacy Policy

© 2026 Dzulhelmy Nazri

APIs & Connections

$defineauth--plain-english

Auth

TLDRHow your app knows who someone is.

Auth is the bouncer.

A website without auth is a shop with the door off. Anyone can walk in and rearrange the shelves. That's fine for a landing page. It's a disaster for "my todos."

Auth is short for authentication (who are you?) plus, usually, authorization (what are you allowed to touch?). People mash those together. You can keep them separate in your head: first the ID check, then the velvet rope.

What actually happens

  1. Someone proves they're them — password, Google button, magic link.
  2. You give them a badge (a session cookie or a token).
  3. Every later request shows the badge at the API window.
  4. The backend looks at the badge and decides if "delete this todo" is their todo.

If you skip step 4, you built a costume party. Anyone with a URL can wear someone else's name.

Better Auth vs Clerk

  • Better Auth — the bouncer lives in your house. You own the users table. More setup, no vendor at the door.
  • Clerk — you rented a professional bouncer. Sign-in UI, user list, the "forgot password" emails. Faster to a demo. Their building, their rules.

none is honest when you don't have users yet. Add it before you store anything you'd be sad to lose.

Don't invent this at 4 a.m.

Password hashing, session theft, "oops I logged in as the other judge" — this is solved, boring, and easy to get wrong. Use a library. Let the library be boring.

What this unlocks

Once there's a bouncer, the rest of the app can ask a simple question: "whose stuff is this?" That's how a demo turns into something you could actually ship on Monday.

Related

  • API
  • Frontend & Backend
  • Deploy
PrevAPI

APIs & Connections

NextDatabase