v0 failing to implement authentication with NextAuth and BetterAuth in Next.js

Problem

Tried to give v0 a properly drafted spec and it did a fantastic job on the frontend, but it failed repeatedly on the authentication implementation.

Current Behavior

  1. NextAuth/Auth.js: v0 suggested this but couldn’t get it working after 5 tokens.
  2. JWT Solution: Attempted a custom JWT solution, which also failed after 2 tokens.
  3. BetterAuth: Tried better-auth, but v0 claimed incompatibility despite it being designed for Next.js.

Pretty disappointed that a simple auth flow doesn’t work. The frontend part took around 1.5 tokens, but losing 90% of my tokens for non-working auth is frustrating.

Environment

  • Framework: Next.js (User mentioned version 16)
  • Tool: v0

Now granted it’s a free tool for me, the tokens were granted for free. But this gives me 0 confidence of purchasing tokens for it.