created simple auth system using betterauth
This commit is contained in:
18
src/lib/auth.ts
Normal file
18
src/lib/auth.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import Database from "better-sqlite3";
|
||||
import { localization } from "better-auth-localization";
|
||||
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: new Database("./sqlite_users.db"),
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
},
|
||||
plugins: [
|
||||
|
||||
localization({
|
||||
defaultLocale: "de-DE", // Default to German
|
||||
fallbackLocale: "default" // Fallback to English
|
||||
})
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user