supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

2.49.3 Intermittent "404: invalid flow state" error during Google authentication

Open eposha opened this issue 8 months ago • 0 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [macOS]
  • Browser any
  • Version of supabase-js: [2.49.3]
  • Version of Node.js: [22]

Additional context

Add any other context about the problem here.

After updating supabase-js to version 2.49.3, I started encountering intermittent errors during Google authentication:

{
  "component": "api",
  "error": "404: invalid flow state, no valid flow state found",
  "level": "info",
  "method": "POST",
  "msg": "404: invalid flow state, no valid flow state found",
  "path": "/token",
  "referer": "",
  "remote_addr": "",
  "request_id": "9286758b-2aa7-4dc8-bea9-a57fefb8fa0b",
  "time": "2025-03-27T18:10:04Z"
}

{
  "component": "api",
  "duration": 1079412,
  "error_code": "flow_state_not_found",
  "level": "info",
  "method": "POST",
  "msg": "request completed",
  "path": "/token",
  "referer": "",
  "remote_addr": "",
  "request_id": "9286758b-2aa7-4dc8-bea9-a57fefb8fa0b",
  "status": 404,
  "time": "2025-03-27T18:10:04Z"
}

The issue seems related to changes in 2.49.3, specifically how flow state is handled in the OAuth process. Since downgrading to 2.49.1 resolves the issue, there might be a regression in the latest version.

eposha avatar Mar 27 '25 19:03 eposha