supabase-js
supabase-js copied to clipboard
`detectSessionInUrl` not used when `pkce` flowType configured
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
This is related to GoTrueClient.
When settings detectSessionInUrl to false it is not used when flowType is pkce.
To Reproduce
Due to this initialization code of GoTrueClient:
private async _initialize(): Promise<InitializeResult> {
try {
const isPKCEFlow = isBrowser() ? await this._isPKCEFlow() : false
this._debug('#_initialize()', 'begin', 'is PKCE flow', isPKCEFlow)
if (isPKCEFlow || (this.detectSessionInUrl && this._isImplicitGrantFlow())) {
const { data, error } = await this._getSessionFromURL(isPKCEFlow)
Expected behavior
I expect it to respect the detectSessionInUrl configuration.
Screenshots
System information
- OS: macOS
- Browser: -
- Version of supabase-js: 2.39.1
- Version of Node.js: -
Additional context
What's your use-case here?
@j4w8n I need to have full control over the flow. On initialize it automatically reads the URL and removes the params then uses them. I want to manually handle this.