feat(auth): Better Auth, kullanıcı adı ile giriş, DAL ve proxy
- MongoDB/Mongoose bağlantıları, kayıt kapalı, admin + username plugin, rate limit - DAL: getCurrentUser, requireSession, requireRole, getActionUser - Kullanıcı adı normalizasyonu: İ/I/ı → i (tr-TR 'ADMIN' → 'admın' hatası) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { adminClient, usernameClient } from "better-auth/client/plugins";
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
|
||||
/** Tarayıcı tarafı Better Auth istemcisi (aynı origin: /api/auth). */
|
||||
export const authClient = createAuthClient({
|
||||
plugins: [usernameClient(), adminClient()],
|
||||
});
|
||||
Reference in New Issue
Block a user