From 7cac2fc2fea589c60b8619b92809bb30c42f5b6f Mon Sep 17 00:00:00 2001 From: GreenmeisterDavid Date: Mon, 14 Oct 2024 17:32:32 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Feat:=20Add=20Google=20oauth=20=20-=20?= =?UTF-8?q?=F0=9F=9A=A7=20=20Work=20in=20progress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 3 + app/components/Auth/Form.vue | 1 + .../Profile/ProfileSectionProviders.vue | 14 +- auth.d.ts | 2 + .../api/me/providers/[providerName].delete.ts | 10 ++ .../migrations/0001_illegal_talos.sql | 3 + .../migrations/meta/0001_snapshot.json | 153 ++++++++++++++++++ server/database/migrations/meta/_journal.json | 7 + server/database/schema.ts | 2 + server/routes/auth/google.get.ts | 77 +++++++++ server/utils/user.ts | 4 + 11 files changed, 274 insertions(+), 2 deletions(-) create mode 100644 server/database/migrations/0001_illegal_talos.sql create mode 100644 server/database/migrations/meta/0001_snapshot.json create mode 100644 server/routes/auth/google.get.ts diff --git a/.env.example b/.env.example index 2cdba70..3841e37 100644 --- a/.env.example +++ b/.env.example @@ -11,4 +11,7 @@ NUXT_OAUTH_TWITCH_CLIENT_ID= NUXT_OAUTH_TWITCH_CLIENT_SECRET= NUXT_OAUTH_TWITCH_REDIRECT_URL=http://localhost +NUXT_OAUTH_GOOGLE_CLIENT_ID= +NUXT_OAUTH_GOOGLE_CLIENT_SECRET= + NUXT_SESSION_PASSWORD= diff --git a/app/components/Auth/Form.vue b/app/components/Auth/Form.vue index c4debde..0e45e35 100644 --- a/app/components/Auth/Form.vue +++ b/app/components/Auth/Form.vue @@ -13,6 +13,7 @@ defineProps<{ :providers="[ { label: 'GitHub', icon: 'i-simple-icons-github', color: 'gray', external: true, to: '/auth/github' }, { label: 'Twitch', icon: 'i-simple-icons-twitch', color: 'gray', external: true, to: '/auth/twitch' }, + { label: 'Google', icon: 'i-simple-icons-google', color: 'gray', external: true, to: '/auth/google' }, ]" >