completionId: cgen-17f1a467e5fd4d86aa9e82fb69d358ec
cgen-17f1a467e5fd4d86aa9e82fb69d358ec
This commit is contained in:
parent
9981407e5f
commit
798db1e906
1 changed files with 8 additions and 0 deletions
|
|
@ -88,6 +88,14 @@ export default async function handler(req: any, res: any) {
|
||||||
|
|
||||||
const discordUser: DiscordUser = await userResponse.json();
|
const discordUser: DiscordUser = await userResponse.json();
|
||||||
|
|
||||||
|
// Validate Discord user has email
|
||||||
|
if (!discordUser.email) {
|
||||||
|
console.error("[Discord OAuth] Discord user has no email");
|
||||||
|
return res.redirect(
|
||||||
|
"/login?error=no_email&message=Please+enable+email+on+your+Discord+account",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize Supabase client with service role
|
// Initialize Supabase client with service role
|
||||||
const supabase = createClient(supabaseUrl, supabaseServiceRole);
|
const supabase = createClient(supabaseUrl, supabaseServiceRole);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue