Skip to main content

Customizing Authentication

The authentication setup in SvelteBolt is highly customizable to fit your app's specific requirements.

Adding Social Providers

  1. Go to the Supabase Dashboard.
  2. Navigate to Authentication > Providers.
  3. Enable the desired provider and configure its credentials.

Extending User Profiles

Add additional fields to the profiles table:

ALTER TABLE public.profiles ADD COLUMN location text;

Update the create_profile function to handle new fields:

NEW.raw_user_meta_data ->> 'location'

Custom Redirect URLs

Update redirect URLs for login or signup flows in src/routes/+page.server.ts:

const { data, error } = await supabase.auth.signInWithOtp({
email,
options: {
redirectTo: "https://your-app.com/dashboard",
},
});