Supabase Authentication Not Working

Hi,

Seeking assistance regarding my Supabase Authentication on RedwoodJS.
Last few days it was working fine but suddenly an error was encountered when logging in to the application. This is the error:
Error: Exception in getAuthenticationContext: No Supabase session found

And when I access the GraphQL UI, this is what it displays:
{ "errors": [ { "message": "Something went wrong.", "extensions": { "originalError": { "message": "Exception in getAuthenticationContext: No Supabase session found", "stack": "Error: Exception in getAuthenticationContext: No Supabase session found\n at onContextBuilding (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\@redwoodjs\\graphql-server\\dist\\plugins\\useRedwoodAuthContext.js:37:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.contextFactory (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\graphql-yoga\\node_modules\\@envelop\\core\\cjs\\orchestrator.js:209:45)\n at async processRequest (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\graphql-yoga\\cjs\\process-request.js:48:26)\n at async YogaServer.getResultForParams (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\graphql-yoga\\cjs\\server.js:286:26)\n at async handle (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\graphql-yoga\\cjs\\server.js:365:25)\n at async graphQLYogaHandler (C:\\Users\\Adafish\\Documents\\fantatech\\Repo\\Gen-AI-Frontend\\gen-ai\\node_modules\\@redwoodjs\\api-server\\dist\\bin.js:465:24)" } } } ] }

my .env variables matches what is on my Supabase account so I find it weird that it says No supabase session found even though I can register new user on my Supabase authentication DB even though the error is shown.

Before value on my Supabase Authentication Table:
Only 1 user is on the Supabase Authentication table

  1. Register new account using register page:

  2. Encounters this error on the Chrome console, but has a response that is successful:
    Failed to load resource: the server responded with a status of 500 (Internal Server Error) RegisterPage.tsx:48 response: Object data : session : {access_token: 'eyJhbGciOiJIUzI1NiIsImtpZCI6Im91ZUc0RmtPb29ES1FLNk…xzZX0.VMDswrkKKTKV5O9WyIJLM2jtitAwA8vRwKPn3QRuodY', token_type: 'bearer', expires_in: 3600, expires_at: 1741286467, refresh_token: 'OpyRB7qxXUGD1lqVLQiXdw', …} user : {id: '51c528f0-d4fd-4018-8cc6-c5272d6322c4', aud: 'authenticated', role: 'authenticated', email: 'test@xyz.com', email_confirmed_at: '2025-03-06T17:41:07.350823437Z', …} [[Prototype]] : Object error : null [[Prototype]] : Object

  3. An error is also encountered on the Visual Studio code
    Error: Exception in getAuthenticationContext: No Supabase session found api | at onContextBuilding (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\@redwoodjs\graphql-server\dist\plugins\useRedwoodAuthContext.js:37:15) api | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) api | at async Object.contextFactory (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\graphql-yoga\node_modules\@envelop\core\cjs\orchestrator.js:209:45) api | at async processRequest (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\graphql-yoga\cjs\process-request.js:48:26) api | at async YogaServer.getResultForParams (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\graphql-yoga\cjs\server.js:286:26) api | at async handle (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\graphql-yoga\cjs\server.js:365:25) api | at async graphQLYogaHandler (C:\Users\Adafish\Documents\fantatech\Repo\Gen-AI-Frontend\gen-ai\node_modules\@redwoodjs\api-server\dist\bin.js:465:24)

  4. Checked Supabase Authentication Table, and found that the new user is now added.

  5. Tried logging in using the new account, monitored to only refreshed but still inside the login page:

error on google chrome console:
LoginPage.tsx:16 POST http://localhost:8910/.redwood/functions/graphql 500 (Internal Server Error) await in (anonymous) handleLogin @ LoginPage.tsx:16 LoginPage.tsx:22 {data: {…}, error: null} data : session : {access_token: 'eyJhbGciOiJIUzI1NiIsImtpZCI6Im91ZUc0RmtPb29ES1FLNk…xzZX0.y2J_rdYGwWOPnn8YDc-Pb_wYmCdTFNKlN_fPDt45gZc', token_type: 'bearer', expires_in: 3600, expires_at: 1741286797, refresh_token: 'FazhRApYPcOnvnxlOTImNg', …} user : {id: '51c528f0-d4fd-4018-8cc6-c5272d6322c4', aud: 'authenticated', role: 'authenticated', email: 'test@xyz.com', email_confirmed_at: '2025-03-06T17:41:07.350823Z', …} [[Prototype]] : Object error : null [[Prototype]] : Object

Please help :frowning: