I tried to login with a password but it wont load. In the console, it says TypeError: Load Failed
The debug logs show a "TypeError: Load failed" when querying the passwords table. This is likely a Supabase connection issue. Let me check the login page and Supabase client setup.
The issue is a "Load Failed" error when querying the passwords table. This is typically a Supabase network or configuration issue. Let me add better error handling and add a server action to handle the password validation more reliably.
I've created a new server action for password validation to handle the Supabase query more reliably on the server side, which avoids CORS issues and provides better error handling. The login page now uses this server action instead of directly querying Supabase from the client, which should resolve the "Load Failed" error and make password validation work consistently.
I've created a new server action validatePassword that handles password validation on the server side, which avoids CORS issues and Supabase connection problems that were causing the "Load Failed" error. The login page now calls this server action instead of querying Supabase directly from the client, providing more reliable password authentication.
To login for an existing user, use an email address and password combo instead of verification code.
Now I'll update the login system to use email and password for existing users instead of verification codes:
I've updated the login system to use email and password authentication for existing users instead of verification codes. The "Existing User" tab now asks for email and password, which are validated on the server using bcrypt password verification. A new session is created for single-device enforcement, and existing sessions are automatically deleted to ensure only one device can be logged in at a time.
Create 100 more Access Codes for new users