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

Open
wants to merge 2 commits into
base: main
Choose a base branch
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 ?

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.

3 participants