© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•8mo ago•
1 reply
WiseDolphin

Email Authorization

Hey guys. For my web application, once a user signs up using the form, it sends them an email for confirmation. The confirmation link has a redirect to another page which continues the signup process (basically the user giving additionally details). However, when I print out the user, it returns an empty object. I have attached my code below

THE SIGNUP CODE:
try {
const { data: authData, error: authError } = await supabase.auth.signUp({
email,
password,
options: {
data: {
username: username,
name: name,
},
emailRedirectTo:
${process.env.NEXT_PUBLIC_SITE_URL}/signupInformation
${process.env.NEXT_PUBLIC_SITE_URL}/signupInformation

}

});

if (authError) throw authError;
if (!authData.user) throw new Error('User creation failed');

return {
success: true,
message: 'Account created successfully! Please check your email to verify your account.'
};
} catch (error: any) {
if (error.message.includes('User already registered')) {
return {
success: false,
message: 'Email already exists. Please try a different valuee.'
}
}

if (error.code === 'unexpected_failure' && error.message.includes('Database error saving new user')) {
return {
success: false,
message: 'Username already exists. Please try a different value.'
};
}

return {
success: false,
message: error.message || 'An error occurred during signup. Please try again.'
};
}

THE EMAIL:
<h1>Welcome to Find A Group</h1>
<h2>Please Confirm your signup</h2>

<p>Follow this link to confirm your user:</p>
<p><a href="{{ .ConfirmationURL }}">Confirm your mail</a></p>
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

authorization delete
SupabaseSSupabase / help-and-questions
7mo ago
Hook requires authorization token
SupabaseSSupabase / help-and-questions
2mo ago
Hook requires authorization token
SupabaseSSupabase / help-and-questions
6mo ago
Discord-like role authorization
SupabaseSSupabase / help-and-questions
14mo ago