fix: env workaround

This commit is contained in:
Jozef Steinhübl 2024-08-03 17:02:05 +02:00
parent becba867ae
commit d937b4e186
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
3 changed files with 10 additions and 3 deletions

View file

@ -2,12 +2,18 @@ import Discord from "@auth/core/providers/discord";
import { defineConfig } from "auth-astro"; import { defineConfig } from "auth-astro";
import type { User } from "~/env"; import type { User } from "~/env";
import dotenv from "dotenv";
dotenv.config();
const { env } = process;
export default defineConfig({ export default defineConfig({
secret: import.meta.env.AUTH_SECRET, secret: env.AUTH_SECRET,
providers: [ providers: [
Discord({ Discord({
clientId: import.meta.env.DISCORD_CLIENT_ID, clientId: env.DISCORD_CLIENT_ID,
clientSecret: import.meta.env.DISCORD_CLIENT_SECRET, clientSecret: env.DISCORD_CLIENT_SECRET,
authorization: authorization:
"https://discord.com/api/oauth2/authorize?scope=guilds+identify+email", "https://discord.com/api/oauth2/authorize?scope=guilds+identify+email",
}), }),

Binary file not shown.

View file

@ -20,6 +20,7 @@
"astro-google-fonts-optimizer": "^0.2.2", "astro-google-fonts-optimizer": "^0.2.2",
"astro-icon": "^0.8.0", "astro-icon": "^0.8.0",
"auth-astro": "^4.1.2", "auth-astro": "^4.1.2",
"dotenv": "^16.4.5",
"preact": "^10.23.1", "preact": "^10.23.1",
"tailwindcss": "^3.3.1" "tailwindcss": "^3.3.1"
}, },