Open
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
I am using self-hosted supabase with gotrue and next js for auth. A few users can't login to the app because they get redirected to the following page every time they try to sign in with google.
[GET] /auth/callback?next=%2F&error_description=Flow%20State%20not%20found&error=server_error status=307
I haven't found anything unusual about these users.
On the client side I call
const { error } = await supabase.auth.signInWithOAuth({
provider: "google",
options: {
redirectTo: `${window.location.origin}/auth/callback?next=${window.location.href}`,
queryParams: {
access_type: "offline",
prompt: "consent",
},
},
});
To Reproduce
I haven't found why it happens to these specific users. They are using mobile chrome and using the same auth flow as other users. They tried logging in using multiple different google accounts.
- Go to https://climbest.app/
- Click on login
- Be lucky I guess?
- Get redirected to the
Flow State not found
error.
Expected behavior
Users can log in to the app.
Screenshots
System information
- User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
- OS: Android 10
- Browser: Chrome 120
- Version of supabase-js: 2.39.0
- Version of Node.js: Node.js 18.x