Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

mariojfduarte
Copy link

What kind of change does this PR introduce?

#59

  • Ensured that the auth object is properly configured with flowType, autoRefreshToken, detectSessionInUrl, persistSession, and any additional options from options.auth.

@@ -170,11 +163,11 @@ export function createServerClient<
...(options?.cookieOptions?.name
? { storageKey: options.cookieOptions.name }
: null),
...options?.auth,
flowType: "pkce",
Copy link
Contributor

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,
Copy link
Author

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

Copy link
Contributor

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

@j4w8n
Copy link
Contributor

j4w8n commented Sep 24, 2024

Based on the resolution of #59, I'd suggest closing this PR. Thoughts @mariojfduarte ?

@silentworks
Copy link
Contributor

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

@J0
Copy link
Contributor

J0 commented Oct 28, 2024

Going to close for now but feel free to re-open if there are updates

@J0 J0 closed this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants