Hello,
I am using v0 from vercel with supabase to create a multi tenant SaaS platform.
After just implementing the base which was fully generated from v0, when trying to login it deletes the session in v0 Preview right after creating it, it works fine in the production env deployed on vercel.
So it is not possible to test my code in the preview as the login failes.
v0 preview current bevaior
when trying to login, the logs show that the session ist created but deleted right away. So I get redirected back to the /login
Logs
Login attempt {“email":"tom@xxx.de”}
08:33:54.836Z
Login response {“data”:{“user”:{“id":“b5ea46d4-448e-492a-b501-b8f31f044100”,“aud”:“authenticated”,“role”:“authenticated”,“email”:"tom@xxx.de”,“email_confirmed_at”:“2025-03-02T20:37:40.798456Z”,“phone”:“”,“confirmation_sent_at”:“2025-03-02T20:37:24.132767Z”,“confirmed_at”:“2025-03-02T20:37:40.798456Z”,“last_sign_in_at”:“2025-03-03T07:33:54.824560645Z”,“app_metadata”:{“provider”:“email”,“providers”:[“email”]},“user_metadata”:{“email":"tom@xxx.de”,“email_verified”:true,“name”:“Tom”,“phone_verified”:false,“sub”:“b5ea46d4-448e-492a-b501-b8f31f044100”},“identities”:[{“identity_id”:“9eecd8fa-9118-4596-ab96-ec0543e8b02c”,“id”:“b5ea46d4-448e-492a-b501-b8f31f044100”,“user_id”:“b5ea46d4-448e-492a-b501-b8f31f044100”,“identity_data”:{“email":"tom@bichay.de”,“email_verified”:true,“name”:“Tom”,“phone_verified”:false,“sub”:“b5ea46d4-448e-492a-b501-b8f31f044100”},“provider":“email”,“last_sign_in_at”:“2025-03-02T20:37:24.127738Z”,“created_at”:“2025-03-02T20:37:24.127795Z”,“updated_at”:“2025-03-02T20:37:24.127795Z”,“email”:"tom@xxx.de”}],“created_at”:“2025-03-02T20:37:24.109449Z”,“updated_at”:“2025-03-03T07:33:54.82718Z”,“is_anonymous”:false},“session”:{“access_token”:“eyJhbGciOiJIUzI1NiIsImtpZCI6IktiOUV0dUpVU0dFeFg3R1QiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3ZndG5kZGprbGZkamdrbGtlZmJvLnN1cGFiYXNlLmNvL2F1dGgvdjEiLCJzdWIiOiJiNWVhNDZkNC00NDhlLTQ5MmEtYjUwMS1iOGYzMWYwNDQxMDAiLCJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNzQwOTkwODM0LCJpYXQiOjE3NDA5ODcyMzQsImVtYWlsIjoidG9tQGJpY2hheS5kZSIsInBob25lIjoiIiwiYXBwX21ldGFkYXRhIjp7InByb3ZpZGVyIjoiZW1haWwiLCJwcm92aWRlcnMiOlsiZW1haWwiXX0sInVzZXJfbWV0YWRhdGEiOnsiZW1haWwiOiJ0b21AYmljaGF5LmRlIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsIm5hbWUiOiJUb20iLCJwaG9uZV92ZXJpZmllZCI6ZmFsc2UsInN1YiI6ImI1ZWE0NmQ0LTQ0OGUtNDkyYS1iNTAxLWI4ZjMxZjA0NDEwMCJ9LCJyb2xlIjoiYXV0aGVudGljYXRlZCIsImFhbCI6ImFhbDEiLCJhbXIiOlt7Im1ldGhvZCI6InBhc3N3b3JkIiwidGltZXN0YW1wIjoxNzQwOTg3MjM0fV0sInNlc3Npb25faWQiOiI5YWJiZjA4Yy05NTk0LTQxYTItYTQwYy1mMzhiMzIzNTMyZmMiLCJpc19hbm9ueW1vdXMiOmZhbHNlfQ.Qz9S5P5mHgmP3oLsVNCqcHNE66hYQZCxZdHec9doXHA”,“token_type”:“bearer”,“expires_in”:3600,“expires_at”:1740990834,“refresh_token”:“t9cd7JBRoqLw2M7JHhvOwQ”,“user”:{“id":“b5ea46d4-448e-492a-b501-b8f31f044100”,“aud”:“authenticated”,“role”:“authenticated”,“email”:"tom@xxx.de”,“email_confirmed_at”:“2025-03-02T20:37:40.798456Z”,“phone”:“”,“confirmation_sent_at”:“2025-03-02T20:37:24.132767Z”,“confirmed_at”:“2025-03-02T20:37:40.798456Z”,“last_sign_in_at”:“2025-03-03T07:33:54.824560645Z”,“app_metadata”:{“provider”:“email”,“providers”:[“email”]},“user_metadata”:{“email":"tom@xxx.de”,“email_verified”:true,“name”:“Tom”,“phone_verified”:false,“sub”:“b5ea46d4-448e-492a-b501-b8f31f044100”},“identities”:[{“identity_id”:“9eecd8fa-9118-4596-ab96-ec0543e8b02c”,“id”:“b5ea46d4-448e-492a-b501-b8f31f044100”,“user_id”:“b5ea46d4-448e-492a-b501-b8f31f044100”,“identity_data”:{“email":"tom@bichay.de”,“email_verified”:true,“name”:“Tom”,“phone_verified”:false,“sub”:“b5ea46d4-448e-492a-b501-b8f31f044100”},“provider":“email”,“last_sign_in_at”:“2025-03-02T20:37:24.127738Z”,“created_at”:“2025-03-02T20:37:24.127795Z”,“updated_at”:“2025-03-02T20:37:24.127795Z”,“email”:"tom@xxx.de”}],“created_at”:“2025-03-02T20:37:24.109449Z”,“updated_at”:“2025-03-03T07:33:54.82718Z”,“is_anonymous”:false}}}}
08:33:54.895Z[SERVER]
Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.
08:33:56.729Z[SERVER]
Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.
Login attempt {email: ‘tom@xxx.de’}
Login response {data: {…}}
Expected behavior
I expected that I get redirected to the dashboard after logging in and session is not null. It works fine in production deployed on vercel withe the same code.
Vercel URL