Open Stokestack opened 1 month ago
Looks like this got resolved on Discord:
I'm not familiar with how you're using Deno, but if you add this option to your client, you shouldn't see the error. It's implying that you aren't doing implicit auth (and maybe you don't need auth anyway), and therefore won't call the _isImplictGrantFlow code.
const supabase = createClient(url, key, {
auth: {
detectSessionInUrl: false
}
})
Thanks. I wouldn't say it's resolved, though, because this outcome isn't documented (as far as I've seen). If you invoke the client as documented, it fails.
Bug report
There is a similar-sounding and possibly related bug here: https://github.com/supabase/supabase-js/issues/786 But the workaround appears to be React-specific and doesn't seem to address the underlying problem.
Describe the bug
I wrote a Deno-based server that is attempting to use Supabase. Upon attempting to insantiate the Supabase client, the application stops with an assertion thrown from GoTrueClient.js, _isImplicitGrantFlow():
In GoTrueClient.js, _isImplicitGrantFlow()
To Reproduce
Set up a local-development environment for Supabase, and populate its public DB schema with a few tables. Run the Supabase TypeScript type generation on it and direct the output to DBTypes.ts in the source directory struture of any Deno project.
In that Deno project, try this:
Expected behavior
The client is created and I can start executing queries with it.
Screenshots
System information
OS: [e.g. macOS, Windows] Mac OS version 14.5
Browser (if applies) [e.g. chrome, safari] N.A.
Version of supabase-js: [e.g. 6.0.2] I guess version 2, based on the import statement I'm using.
Version of Node.js: [e.g. 10.10.0] N.A.
Additional context
Obviously this is a show-stopper.