-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update authentication options in createServerClient #60
Conversation
@@ -170,11 +163,11 @@ export function createServerClient< | |||
...(options?.cookieOptions?.name | |||
? { storageKey: options.cookieOptions.name } | |||
: null), | |||
...options?.auth, | |||
flowType: "pkce", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it'd no longer be possible to override persistSession
, autoRefreshToken
etc.. with user supplied options after this change. Not sure if we'd want that
Let me know if I've misunderstood the change though.
flowType: "pkce", | ||
autoRefreshToken: false, | ||
detectSessionInUrl: false, | ||
persistSession: true, | ||
...options?.auth, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would, currently is it not possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it would make it configurable. I'm still not sure it'll fix the concern around a service role client though. Let's complete discussing the issue on the thread and circle back to this PR if needed
Based on the resolution of #59, I'd suggest closing this PR. Thoughts @mariojfduarte ? |
This is also documented in the troubleshooting section of GitHub discussions and it should show up in the AI search in the docs if you search. This PR shouldn't be included as it will cause more issues than solving an issue. https://github.com/orgs/supabase/discussions/15860 |
Going to close for now but feel free to re-open if there are updates |
What kind of change does this PR introduce?
#59
auth
object is properly configured withflowType
,autoRefreshToken
,detectSessionInUrl
,persistSession
, and any additional options fromoptions.auth
.