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 session cookie domain handling in fetchHandler #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Coeeter
Copy link

@Coeeter Coeeter commented Jul 10, 2024

Description

This pull request enhances the session management in the fetchHandler by introducing the ability to set a domain for session cookies. This change ensures that session cookies are correctly scoped to the specified domain, which is particularly useful for cross-domain authentication scenarios. The following updates were made:

  • Added domain option to MyAnimeListHandlerOptions in types.ts.
  • Modified fetchHandler.ts to include the domain parameter when setting and deleting cookies.

Reasoning

The update addresses the need for flexible session cookie management across different domains, improving the authentication flow and ensuring consistency in cookie handling. This is particularly important for applications operating in a multi-domain environment, ensuring user sessions are correctly maintained and scoped.

Files changed

  • fetchHandler.ts: Added domain parameter to cookie set and delete operations.
  • types.ts: Introduced domain option in MyAnimeListHandlerOptions.
    By incorporating this change, the session management becomes more robust and adaptable to various deployment scenarios.

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