auth-helpers-sveltekit best way to access session

Hey peeps,

I am making a fresh sveltekit project with supabase for db and auth and just picking up from the documentation example. I noticed 2 ways of accessing the session inside a load function:
const { session} = await getSupabase(event)

and
const session = await getServerSession(event)

and I was wondering what's the difference between the 2 and whether I should prefer one over the other (e.g. one for server side and one for client side?). Also do I have to load it like that on every route? Can't I just load it on my root's +layout.server.ts and pass it down through data and const { session } = await parent() in my subroute layouts?
Was this page helpful?