diff --git a/app/src/global.d.ts b/app/src/global.d.ts
index d648a04..a4a6c44 100644
--- a/app/src/global.d.ts
+++ b/app/src/global.d.ts
@@ -3,6 +3,8 @@
interface ImportMetaEnv {
VITE_GOOGLE_OAUTH_CLIENT_ID: string;
VITE_GOOGLE_OAUTH_CLIENT_SECRET: string;
+ VITE_TWITCH_OAUTH_CLIENT_ID: string;
+ VITE_TWITCH_OAUTH_CLIENT_SECRET: string;
VITE_FACEBOOK_OAUTH_CLIENT_ID: string;
VITE_FACEBOOK_OAUTH_CLIENT_SECRET: string;
VITE_TWITTER_API_KEY: string;
diff --git a/app/src/lib/appAuth.ts b/app/src/lib/appAuth.ts
index 315fa63..f337b64 100644
--- a/app/src/lib/appAuth.ts
+++ b/app/src/lib/appAuth.ts
@@ -1,5 +1,6 @@
import { SvelteKitAuth } from "sk-auth";
import {
+ TwitchOAuth2Provider,
FacebookOAuth2Provider,
GoogleOAuth2Provider,
RedditOAuth2Provider,
@@ -15,6 +16,13 @@ export const appAuth = new SvelteKitAuth({
return { ...profile, provider: "google" };
},
}),
+ new TwitchOAuth2Provider({
+ clientId: import.meta.env.VITE_TWITCH_OAUTH_CLIENT_ID,
+ clientSecret: import.meta.env.VITE_TWITCH_OAUTH_CLIENT_SECRET,
+ profile(profile) {
+ return { ...profile, provider: "twitch" };
+ },
+ }),
new FacebookOAuth2Provider({
clientId: import.meta.env.VITE_FACEBOOK_OAUTH_CLIENT_ID,
clientSecret: import.meta.env.VITE_FACEBOOK_OAUTH_CLIENT_SECRET,
diff --git a/app/src/routes/login.svelte b/app/src/routes/login.svelte
index b897ec2..df5cf77 100644
--- a/app/src/routes/login.svelte
+++ b/app/src/routes/login.svelte
@@ -36,6 +36,38 @@