In production authGuard event.cookies.getAll() is null though signInWithPassword() is successfull and hooks.server.ts cookies.set() is successfully called. The same works in localserver #26514
Labels
auth
All thing Supabase Auth related
bug
Something isn't working
needs-analysis
Issue status is unknown and/or not possible to triage with the current info
Bug report
Describe the bug
I followed the documentation: https://supabase.com/docs/guides/auth/server-side/sveltekit and everything works on my local server, even with HTTPS. However, in production on Azure Static Web Apps, I'm having an:
The problem is that
authGuard
in src/hooks.server.ts redirects to login again, even though login was successful. When I logevent.cookies.getAll()
, it shows no cookies, even though the cookie is being set.login
action in src/routes/login/+page.server.ts usingsignInWithPassword
is successfulcookies.set
in src/hooks.server.ts sets thesb-<supbaseprojectname>-auth-token
cookieTo Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
authGuard
:src/hooks.server.tssafeGetSession
: src/hooks.server.tslogin
action in src/routes/login/+page.server.ts:Expected behavior
After successful login redirect to /private
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: