nextjs-auth-starter
Version:
CLI tool to set up Next.js authentication with better-auth, PostgreSQL, and Drizzle ORM. Usage: npx nextjs-auth-starter init
48 lines (43 loc) • 984 B
TypeScript
interface BetterAuthKitConfig {
database: {
connectionString: string;
};
auth: {
secret: string;
baseUrl: string;
google?: {
clientId: string;
clientSecret: string;
};
};
email?: {
from: string;
smtp?: {
host: string;
port: number;
user: string;
password: string;
};
};
}
interface User {
id: string;
name: string;
email: string;
emailVerified: boolean;
image?: string;
createdAt: Date;
updatedAt: Date;
}
interface Session {
id: string;
userId: string;
token: string;
expiresAt: Date;
createdAt: Date;
updatedAt: Date;
}
declare function createAuth(config: any): void;
declare function createAuthMiddleware(): (request: any) => Promise<never>;
declare const db: any;
export { type BetterAuthKitConfig, type Session, type User, createAuth, createAuthMiddleware, db };