auth-helpers - can't get RLS to work from Sveltekit endpoint
I'm having a problem with the RLS for my sveltekit app from the node endpoints
It works perfectly with client-side JS, but fails when I use the new auth-helpers approach from the endpoints
I'm following the
My query looks like this
I get a 403 back from the endpoint with error
I print out locals.user just before the call and it is authenticated.
I can't find any API documentation on the auth-helpers project, just the example in the README and the examples folder.
But I'm guessing the withApiAuth({ user: locals.user }, ... ) call is setting the user from there, so don't know why my RLS isn't working
there is a note in the user object
but none of the examples do that ... they just use locals.user.
So I tried
Any ideas?
It works perfectly with client-side JS, but fails when I use the new auth-helpers approach from the endpoints
I'm following the
sveltekit-magic-link exampleMy query looks like this
I get a 403 back from the endpoint with error
I print out locals.user just before the call and it is authenticated.
I can't find any API documentation on the auth-helpers project, just the example in the README and the examples folder.
But I'm guessing the withApiAuth({ user: locals.user }, ... ) call is setting the user from there, so don't know why my RLS isn't working
there is a note in the user object
but none of the examples do that ... they just use locals.user.
So I tried
getUser ... it returns an authenticated user and all looks good, but I still get the same RLS error.Any ideas?