@@ -212,7 +212,6 @@ export const auth = betterAuth({
212212 'github' ,
213213 'email-password' ,
214214 'confluence' ,
215- // 'supabase',
216215 'x' ,
217216 'notion' ,
218217 'microsoft' ,
@@ -950,56 +949,6 @@ export const auth = betterAuth({
950949 } ,
951950 } ,
952951
953- // Supabase provider (unused)
954- // {
955- // providerId: 'supabase',
956- // clientId: env.SUPABASE_CLIENT_ID as string,
957- // clientSecret: env.SUPABASE_CLIENT_SECRET as string,
958- // authorizationUrl: 'https://api.supabase.com/v1/oauth/authorize',
959- // tokenUrl: 'https://api.supabase.com/v1/oauth/token',
960- // userInfoUrl: 'https://dummy-not-used.supabase.co',
961- // scopes: ['database.read', 'database.write', 'projects.read'],
962- // responseType: 'code',
963- // pkce: true,
964- // redirectURI: `${getBaseUrl()}/api/auth/oauth2/callback/supabase`,
965- // getUserInfo: async (tokens) => {
966- // try {
967- // logger.info('Creating Supabase user profile from token data')
968-
969- // let userId = 'supabase-user'
970- // if (tokens.idToken) {
971- // try {
972- // const decodedToken = JSON.parse(
973- // Buffer.from(tokens.idToken.split('.')[1], 'base64').toString()
974- // )
975- // if (decodedToken.sub) {
976- // userId = decodedToken.sub
977- // }
978- // } catch (e) {
979- // logger.warn('Failed to decode Supabase ID token', {
980- // error: e,
981- // })
982- // }
983- // }
984-
985- // const uniqueId = `${userId}-${Date.now()}`
986- // const now = new Date()
987-
988- // return {
989- // id: uniqueId,
990- // name: 'Supabase User',
991- // email: `${uniqueId.replace(/[^a-zA-Z0-9]/g, '')}@supabase .user`,
992- // emailVerified: false,
993- // createdAt: now,
994- // updatedAt: now,
995- // }
996- // } catch (error) {
997- // logger.error('Error creating Supabase user profile:', { error })
998- // return null
999- // }
1000- // },
1001- // },
1002-
1003952 // X provider
1004953 {
1005954 providerId : 'x' ,
@@ -1133,57 +1082,6 @@ export const auth = betterAuth({
11331082 } ,
11341083 } ,
11351084
1136- // Discord provider (unused)
1137- // {
1138- // providerId: 'discord',
1139- // clientId: env.DISCORD_CLIENT_ID as string,
1140- // clientSecret: env.DISCORD_CLIENT_SECRET as string,
1141- // authorizationUrl: 'https://discord.com/api/oauth2/authorize',
1142- // tokenUrl: 'https://discord.com/api/oauth2/token',
1143- // userInfoUrl: 'https://discord.com/api/users/@me',
1144- // scopes: ['identify', 'bot', 'messages.read', 'guilds', 'guilds.members.read'],
1145- // responseType: 'code',
1146- // accessType: 'offline',
1147- // authentication: 'basic',
1148- // prompt: 'consent',
1149- // redirectURI: `${getBaseUrl()}/api/auth/oauth2/callback/discord`,
1150- // getUserInfo: async (tokens) => {
1151- // try {
1152- // const response = await fetch('https://discord.com/api/users/@me', {
1153- // headers: {
1154- // Authorization: `Bearer ${tokens.accessToken}`,
1155- // },
1156- // })
1157-
1158- // if (!response.ok) {
1159- // logger.error('Error fetching Discord user info:', {
1160- // status: response.status,
1161- // statusText: response.statusText,
1162- // })
1163- // return null
1164- // }
1165-
1166- // const profile = await response.json()
1167- // const now = new Date()
1168-
1169- // return {
1170- // id: profile.id,
1171- // name: profile.username || 'Discord User',
1172- // email: profile.email || `${profile.id}@discord .user`,
1173- // image: profile.avatar
1174- // ? `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.png`
1175- // : undefined,
1176- // emailVerified: profile.verified || false,
1177- // createdAt: now,
1178- // updatedAt: now,
1179- // }
1180- // } catch (error) {
1181- // logger.error('Error in Discord getUserInfo:', { error })
1182- // return null
1183- // }
1184- // },
1185- // },
1186-
11871085 // Jira provider
11881086 {
11891087 providerId : 'jira' ,
@@ -1323,7 +1221,6 @@ export const auth = betterAuth({
13231221 authorizationUrl : 'https://api.notion.com/v1/oauth/authorize' ,
13241222 tokenUrl : 'https://api.notion.com/v1/oauth/token' ,
13251223 userInfoUrl : 'https://api.notion.com/v1/users/me' ,
1326- scopes : [ 'workspace.content' , 'workspace.name' , 'page.read' , 'page.write' ] ,
13271224 responseType : 'code' ,
13281225 pkce : false ,
13291226 accessType : 'offline' ,
0 commit comments