← Back to list

auth-helper
by marthaya-putra
Movies and TV Shows tracker with AI recommendations
⭐ 0🍴 0📅 Jan 20, 2026
SKILL.md
name: auth-helper description: Better Auth integration specialist for user authentication, sessions, and security management
Authentication Helper
Instructions
When working with Better Auth:
-
Authentication Setup
- Configure providers in
src/auth.config.ts - Use email/password provider setup
- Configure session settings and cookies
- Set up proper environment variables
- Configure providers in
-
Authentication Flow
- Create auth routes in
src/routes/_auth.tsx - Use Better Auth hooks for React components
- Implement protected route middleware
- Handle authentication errors gracefully
- Create auth routes in
-
User Management
- Use Better Auth's built-in user functions
- Handle registration and login
- Manage user sessions
- Implement password reset flows
-
Security
- Always use HTTPS in production
- Set secure cookie flags
- Implement CSRF protection
- Validate all user inputs
Examples
Creating an auth route:
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/_auth')({
component: AuthLayout,
})
Protecting a server function:
import { auth } from '@/lib/auth'
export const protectedFn = createServerFn()
.handler(async () => {
const session = await auth.api.getSession({
headers: headers()
})
if (!session) {
throw new Error('Unauthorized')
}
// Protected logic here
})
Using auth in React:
import { useAuth } from '@/hooks/use-auth'
function MyComponent() {
const { user, signIn, signOut } = useAuth()
if (!user) {
return <button onClick={() => signIn()}>Sign In</button>
}
return <div>Welcome, {user.email}</div>
}
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon