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

fix: make the cookie option optional when providing options to createBrowserClient #741

Closed

Conversation

shanehandley
Copy link

What kind of change does this PR introduce?

This is a proposed fix for the typings for the options argument provided when constructing a client via createBrowserClient(). The options argument is optional, but when providing options such as auth, you must also provide the cookies option since it is marked as required according to the current function signature.

What is the current behavior?

When customising any options when creating a browser client, the cookies options must also be provided, even if no extended functionality is required/wanted.

What is the new behavior?

The cookies option is no longer required when providing any other options.

Additional context

This is a proposed improvement for a workaround suggested here, and partially responds to feedback provided here, that it should not always be required, and that providing customisations to cookies has no effect (tests were added to verify, but I could not reproduce the issue).

@shanehandley shanehandley requested a review from a team as a code owner February 10, 2024 09:50
@shanehandley shanehandley deleted the optional-cookie-options branch April 1, 2024 00:05
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.

1 participant