.qwen/skills/todo-jwt-auth/SKILL.md
Better Auth JWT on frontend + PyJWT verification on FastAPI backend
npx skillsauth add abdulahadnauman20/hackathon-2-phase-2- Todo JWT + Better Auth IntegrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the authentication specialist.
Rules:
Frontend pattern:
const token = session?.token ?? session?.access_token;
headers: { Authorization: Bearer ${token} }
Backend dependency: from fastapi import Depends, HTTPException, Header import jwt, os
def get_current_user(authorization: str = Header(None)): if not authorization or not authorization.startswith("Bearer "): raise HTTPException(401, "Missing or invalid token") token = authorization.split(" ")[1] try: payload = jwt.decode(token, os.getenv("BETTER_AUTH_SECRET"), algorithms=["HS256"]) return payload.get("sub") or payload.get("user_id") except jwt.ExpiredSignatureError: raise HTTPException(401, "Token expired") except jwt.InvalidTokenError: raise HTTPException(401, "Invalid token")
development
Zod + react-hook-form for task forms
development
Security check, ownership, edge cases, test suggestions
development
FastAPI + SQLModel CRUD routes for tasks with strict user ownership
tools
Spinners, skeletons, empty messages