From 45af37bc7097ff42b38982cadb3a07e178ba88c8 Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:02:00 -0400 Subject: [PATCH] feat: enable Github auth and add to script --- auth.config.ts | 11 +++++++++++ public/admin/config.yml | 2 -- public/admin/index.html | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 auth.config.ts diff --git a/auth.config.ts b/auth.config.ts new file mode 100644 index 0000000..27b5076 --- /dev/null +++ b/auth.config.ts @@ -0,0 +1,11 @@ +import GitHub from "@auth/core/providers/github" +import { defineConfig } from "auth-astro" + +export default defineConfig({ + providers: [ + GitHub({ + clientId: import.meta.env.GITHUB_CLIENT_ID, + clientSecret: import.meta.env.GITHUB_CLIENT_SECRET, + }), + ], +}) diff --git a/public/admin/config.yml b/public/admin/config.yml index cd727e3..bf7b7b6 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -1,5 +1,3 @@ -local_backend: true - backend: name: github repo: brown-ccv/mmp diff --git a/public/admin/index.html b/public/admin/index.html index e5267ed..c0f08e0 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -10,7 +10,10 @@
- +