All Questions

Tagged with
Filter by
Sorted by
Tagged with
14 votes
1 answer
7k views

How can I send secure API requests from SvelteKit app, without showing API keys on the client side?

I'm using Supabase for a new Sveltekit app, with this template Currently, I'm passing the Supabase keys through on the client side, like this: const supabase = createClient( import.meta.env....
amatur's user avatar
  • 327
5 votes
2 answers
2k views

How to pass in parameters from client side to server side code in Sveltekit?

I've been trying to run a query to a Supabase database that needs a dog breed passed through and will return metrics about it, the breed is defined on the client side. I was able to get the server ...
BeratK2's user avatar
  • 63
4 votes
1 answer
2k views

Cannot destructure property 'supabaseUrl' of 'getConfig(...)' as it is undefined

I followed @supabase/auth-helpers-sveltekit guide on how to integrate supabase-auth helpers with sveltekit. Yet, when running the dev server, I get an internal error Cannot destructure property '...
Aerodynamic's user avatar
4 votes
2 answers
1k views

Sveltekit,Supabase and Vercel (problem with Supabase when deploying to Vercel)

I'm trying to set up Sveltekit, Supabase and Vercel. It works correctly on a local environment (SvelteKit and Supabase), but when I deploy it to Vercel there is a problem with Supabase - "Error: ...
Todor Markov's user avatar
4 votes
1 answer
2k views

supabaseUrl is required sveltekit

I'm having this problem for quite a while and want to solve this: According to supbase documentation you create a .env file VITE_SUPABASE_URL="YOUR_SUPABASE_URL" VITE_SUPABASE_ANON_KEY="...
equi's user avatar
  • 164
4 votes
1 answer
3k views

Error when trying to call a supabase edge function

I am trying to call a supabase edge function in javascript but I am getting this error: access to fetch at 'https:/blablala.functions.supabase.co/hello-world' from origin 'http://localhost:5173' has ...
Sebastian Trygg's user avatar
3 votes
1 answer
395 views

Dynamic social sharing cards populated in <svelte:head>

I've built a blog website and am trying to implement dynamic social share cards for each individual blog. While everything appears to be working properly when I inspect the head element in developer ...
jrfii's user avatar
  • 41
3 votes
3 answers
1k views

How to implement cookie authentication with Sveltekit & Supabase?

I'm fairly new to both SvelteKit & Supabase and have done a bit of experimentation on my own, but I would like to know what is the best way to implement user authentication with both of these ...
Mr.Bill's user avatar
  • 179
2 votes
1 answer
2k views

How to check if a user is signed in with Supabase in SvelteKit?

I am working on a SvelteKit application and using Supabase for user authentication. I have implemented the sign-in functionality in my /signin/+page.server.ts file using the supabase.auth....
Sebastian Trygg's user avatar
2 votes
2 answers
2k views

Is there a way to remove previous session without hard refreshing (sveltekit and Supabase)

im practicing authentication at the moment with sveltekit and Supabase RLS is on and one of the issues im having is after i log out, and i sign in with another email, i can see the info from the ...
Nicholas Singh's user avatar
2 votes
1 answer
846 views

Use Supabase .select with Sveltekit store

if in my current .svelte file i have let todos = []; onMount(async () => { let { data, error } = await supabase .from('todos') .select('*') todos = data; however i don't think that's pretty ...
Nicholas Singh's user avatar
2 votes
1 answer
1k views

Typescript error with SvelteKit and Supabase data fetching (Type 'null' is not assignable to type 'ArrayLike<unknown>')

I have a SvelteKit project set up which authenticates with supabase. I used this guide for that. The authentication and data fetching works fine so far. Actually, in terms of the app itself, ...
Liam's user avatar
  • 23
2 votes
1 answer
223 views

supabase auth helpers ui with Google social login, how to restrict users to domain

Google offer a 'hd' parameter to restrict oauth access to domain. Anyway to set this when using supabase auth helpers / auth UI?
Mike Thrussell's user avatar
2 votes
1 answer
2k views

Sveltekit update reactive variable from form action

Hi! So I'm working on a simple crud application with Sveltekit and Supabase. I'm trying to implement this sorting feature by fetching the table with the added .order() function when the user selects a ...
bob's user avatar
  • 65
2 votes
2 answers
1k views

SvelteKit + Supabase - get data onMount, keep pre-fetch working

I am building the site which seems fairly simple show data on page from database. I want it to be as fast as possible. It already works/partially works in 3 ways: #Approach 1 +page.server.js -> ...
Ryszard Kozłowski's user avatar
2 votes
0 answers
3k views

Why is supabase update not working for me?

I am trying to update a user's name in the profiles table. This command works when i disable rls on the table but not when it is on. When the function is called the error is null, data is just an ...
Jaksa's user avatar
  • 43
2 votes
2 answers
436 views

Pass a value from an api into an object as to insert a new row into the database

Using type=radio along with bind:group as shown in my example this will add the row to the database, but it only works for 1 entry plus the user needs to check the radio. Staring with just adding 1 ...
Dustin's user avatar
  • 21
1 vote
1 answer
3k views

Supabase StorageApiError: The resource was not found

I'm trying to download a PDF file from a bucket from a SvelteKit endpoint. The file is there (I logged filePath and bucketName to the console and checked them against my actual bucket), and I think ...
Koen's user avatar
  • 356
1 vote
1 answer
459 views

Supabase & SvelteKit Auth Error when registering a new user "PKCE flow"

Whenever I try to register a new account I get the following error on my container: PKCE flow is not supported on signups with autoconfirm enabled
HONjramiroz98's user avatar
1 vote
1 answer
248 views

Why does Typescript throw an error when I try to create Supabase client file?

I am quite new to SvelteKit and Typescript and I've recently tried uisng Supabase with SvelteKit (Typescript) and it all went well unil all of a sudden, after few projects Typescript began compalining ...
Gal Povsod's user avatar
1 vote
1 answer
672 views

Internal server error: supabaseUrl is required. (Vite and Sveltekit)

I've been trying to add environment variables to my db.js file which connects to a Supabase database. When I pass the URL and key as a string it works perfectly but when I try to add environment ...
BeratK2's user avatar
  • 63
1 vote
1 answer
555 views

SvelteKit/Supabase Type 'Session | null' is not assignable to type 'Session'

tl:dr This is the error I'm getting in VS Code: let session: AuthSession Type 'Session | null' is not assignable to type 'Session'. Type 'null' is not assignable to type 'Session'.ts(2322) ...
farnsco's user avatar
  • 75
1 vote
3 answers
538 views

Make DOM live update with SvelteKit and Supabase

I am using SvelteKit with Supabase. Whenever the form is submitted I would like to see the DOM live update. However, it takes a refresh to see the changes. How would I live update the DOM whenever a ...
user avatar
1 vote
1 answer
2k views

When deploying Sveltekit app to Netlify, build breaks with error '@supabase/supabase-js' does not provide an export named 'createClient'. How to fix?

When I try to deploy a SvelteKit app with supabase to Netlify (using adapter-netlify), the Netlify build fails with the following error: requested module '@supabase/supabase-js' does not provide an ...
amatur's user avatar
  • 327
1 vote
0 answers
28 views

How can I display unique data associated with param on individual pages in SvelteKit using slug/parameter routing

I'm currently working on a SvelteKit project where I have a list of cards representing different law firms. Each card is linked to a unique page using slug/parameter routing. I've managed to fetch the ...
jvs789789's user avatar
  • 203
1 vote
1 answer
34 views

supabase auth ui not redirecting after successful sign in

I have followed: https://supabase.com/docs/guides/getting-started/tutorials/with-sveltekit?language=ts and verified that everything runs correctly and all files are in the right place/have the correct ...
alex's user avatar
  • 13
1 vote
2 answers
335 views

Supabase auth not storing anything in cookies sveltekit

I am trying to build a simple supabase application, I have followed the documentation for the "auth" section exactly, as far as I can tell. Currently, I am generating a magic link, getting a ...
mrosenbaum's user avatar
1 vote
1 answer
400 views

How to fetch data from Component with Supabase & Auth Helpers Sveltekit

I have an input inside a component in Svelte. It is part of series of steps using svelte-stepper. I need the user to enter their organizationID into an input field and then I want to see if that value ...
ethanfox27's user avatar
1 vote
0 answers
176 views

Cannot Delpoy Sveltekit app with Supabase From netlify

So i have a app with Sveltekit tailwindcss skeleton ui and supabase, i have tried to deploy from vercel and netlify but neither of them have been working! Error: import { 7:49:34 AM: 3: ...
ΔβΙΧΚαΓ K's user avatar
1 vote
0 answers
555 views

How to user a svelte store variable in an endpoint?

Im using supabase for my back end and in my end point i want to fetch data for the user that is logged in via the .eq method. I have a user variable in my store however I keep getting errors because i ...
Nicholas Singh's user avatar
1 vote
0 answers
219 views

svelte and supabase endpoints

For supabase and sveltekit. which is better for fetching the data. using the stores or using endpoints? im trying to understand why the endpoints are so important. besides lessing down on the boiler ...
Nicholas Singh's user avatar
0 votes
1 answer
621 views

supabase auth-helpers with auth-ui, how to hide email/password when using social

When setting social login, there doesn't seem to be a way to hide the email/password boxes. <Auth supabaseClient={data.supabase} view="sign_in" ...
Mike Thrussell's user avatar
0 votes
1 answer
109 views

SvelteKit supabaseUrl is required - after successful deployment

I keep getting this error after I deploy my app with npm run preview and when I deploy through Vercel. I get no error when the app is "building" The problem isn't the .env variables being ...
ethanfox27's user avatar
0 votes
1 answer
1k views

how to append forms based on input with svelte

can someone help me understand this please. I want when someone enters a number, that 2 forms appear and the data from those forms would go into a new object that i can push to supabase for example ...
Nicholas Singh's user avatar
0 votes
1 answer
11 views

Supabase table not being updated through Sveltekit App

I've successfully fetched the information (from supabase) and it's being displayed on the page - with functionality that includes an "Edit" button. The "Edit" button is allowing me ...
jvs789789's user avatar
  • 203
0 votes
1 answer
29 views

How do I display Supabase AuthApiError from server-side in client -side

I am working on a SvelteKit application with a Supabase back-end. I just finished on input validation, and now I am trying to display errors for invalid credentials. I am struggling find a way to do ...
Leonard's user avatar
  • 73
0 votes
0 answers
62 views

How to get email confirmation to work on Supabase local development environment

I working on authentication on a Supabase and SvelteKit project. I have setup the authentication client and Signup works fine, but the email confirmation is causing problems. I am running a local ...
Leonard Marshall-Afzal's user avatar
0 votes
0 answers
44 views

With Supabase and SvelteKit, I'm getting an empty array with RLS even with policy

I have a client table an want to allow the users to see only the clients they created. I enabled RLS and created a policy, but I'm getting an empty array when querying the data. In Supabase Studio, ...
gomespereira's user avatar
0 votes
0 answers
35 views

Deploy Svelte and Supabase to Google cloud and supabase is unable to get the environment variables

What I expected to happen I’m trying to use gcloud command line to deploy and sveltekit web app with supabase. I expected the build to complete successfully and be able to host my app on google cloud. ...
Ming's user avatar
  • 1
0 votes
0 answers
30 views

Incompatible types error in TypeScript that I don't understand

I just started learning TypeScript and SvelteKit and I came across this error today: Type '{ id: any; user_id: any; video_id: any; question: any; created_at: any; response: any; state: any; users: { ...
Regis Tremblay Lefrancois's user avatar
0 votes
0 answers
56 views

supabase retrieve access token on server side

anyone know how to retrieve the access token when you click "send password recovery"? the redirect_url looks something like this: http://localhost:5173/#access_token=eyJhbG...&token_type=...
user3474181's user avatar
0 votes
0 answers
20 views

POST request going through before having post validation

I'm using Sveltekit as the framework paired with supabase and have installed a sveltekit form validator. Im pretty new to back end stuff and have just crammed code that I've read online trying tp ...
Malekzie's user avatar
0 votes
0 answers
25 views

Supabase Client Unresponsive in SvelteKit When User is Signed In and Website Loses Focus

I am facing an issue with SvelteKit and Supabase integration. When there is no user signed in, the Supabase client works as expected, even when the website loses focus or I change the browser tab. ...
Arben Apura's user avatar
0 votes
1 answer
203 views

message: 'TypeError: fetch failed' - SvelteKit + Supabase

I am creating a Sveltekit project and decided to use Supabase as my database. src/lib/supabaseClient.js import { createClient } from '@supabase/supabase-js' import {SUPABASE_URL, SUPABASE_KEY} from '$...
mukunda's user avatar
  • 415
0 votes
0 answers
126 views

How to fix 405 error code from displaying before auth comes back from supabase

I am using Supabase to handle auth in my Sveltekit app. When user logs in with proper credentials after they have signed up, I am getting a quick flash onscreen that says 405 POST method not allowed. ...
boknows's user avatar
0 votes
0 answers
309 views

SvelteKit + Supabase OAuth Redirect Issue

I'm currently learning SvelteKit and Supabase + Supabase authentication. I'm using Google OAuth for user login, following the tutorial from here. When a user logs in with the Google provider, I ...
jhkmw3's user avatar
  • 117
0 votes
0 answers
390 views

Supabase function not returning data when called from Svelte app

I've got the following Supabase function: CREATE OR REPLACE FUNCTION public.file_exists(file_path varchar) RETURNS boolean LANGUAGE plpgsql AS $$ BEGIN RETURN (SELECT EXISTS (SELECT id ...
Danyx's user avatar
  • 644
0 votes
0 answers
120 views

How to avoid a waterfall in a SvelteKit api +server.js file?

Is it possible to avoid making a water fall of these 2 calls to Supabase? It would be awesome to load the data in parallell. export async function POST({ request }) { const reqData = await request....
johnohod's user avatar
  • 494
0 votes
0 answers
374 views

Combining Steam OpenID 2.0 with Supabase auth

So I'm currently using the node-steam-openid package in my SvelteKit app in order to allow users to Sign in with Steam. This works fine, and it returns the user's steam_id on the server side. However, ...
J P's user avatar
  • 531
0 votes
0 answers
288 views

How to access session data in a POST request within Sveltekit

Specifically, I wish to insert a record into a Supabase table by an authenticated user. Retrieving data by an authenticated user works fine: export const load = async ({ params, locals: { supabase, ...
Mike Thrussell's user avatar