mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-24 16:11:53 -05:00
fix: astro example (#385)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "pnpm migrate:auth && astro dev --port 3000",
|
||||
"migrate:auth": "pnpm better-auth migrate",
|
||||
"migrate:auth": "pnpx @better-auth/cli migrate",
|
||||
"start": "astro dev",
|
||||
"build": "astro check && astro build",
|
||||
"preview": "astro preview",
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import { passkey, twoFactor } from "better-auth/plugins";
|
||||
import Database from "better-sqlite3";
|
||||
import { Resend } from "resend";
|
||||
|
||||
const resend = new Resend(import.meta.env.RESEND_API_KEY);
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: new Database("./db.sqlite"),
|
||||
@@ -18,8 +15,12 @@ export const auth = betterAuth({
|
||||
},
|
||||
socialProviders: {
|
||||
google: {
|
||||
clientId: import.meta.env.GOOGLE_CLIENT_ID || "",
|
||||
clientSecret: import.meta.env.GOOGLE_CLIENT_SECRET || "",
|
||||
clientId: import.meta.env.GOOGLE_CLIENT_ID!,
|
||||
clientSecret: import.meta.env.GOOGLE_CLIENT_SECRET!,
|
||||
},
|
||||
github: {
|
||||
clientId: import.meta.env.GITHUB_CLIENT_ID!,
|
||||
clientSecret: import.meta.env.GITHUB_CLIENT_SECRET!,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
|
||||
Reference in New Issue
Block a user