diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000000000000000000000000000000000..989004ff2ced78bcf1c641b32620ca2b309b0974 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +AIDC_CLIENT_ID="7cdc367a-ed17-4b59-b92d-3435f84df1e8" +AIDC_CLIENT_SECRET="GL1CJdo7eUSC5nayoEec_yon3k" \ No newline at end of file diff --git a/src/auth.ts b/src/auth.ts index af3ceb6318698d37741de17c6075f68cb3aba3b5..9f5dfcb85ee75fd96e2ac9b21126eb4890192b13 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,10 +1,10 @@ -import { AIDC_CLIENT_ID, AIDC_CLIENT_SECRET } from "$env/static/private"; +import { env } from "$env/dynamic/private"; import { AriseIdConnect } from "$lib/index.js"; import { defaultLucia } from "$lib/default.js"; export const aidc = await AriseIdConnect.init({ - client_id: AIDC_CLIENT_ID, - client_secret: AIDC_CLIENT_SECRET, + client_id: env.AIDC_CLIENT_ID, + client_secret: env.AIDC_CLIENT_SECRET, scope: "openid offline profile", luciaWrapper: defaultLucia, });