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

Add possibility to control cookie settings #36

Open
machak opened this issue Jun 1, 2021 · 1 comment
Open

Add possibility to control cookie settings #36

machak opened this issue Jun 1, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@machak
Copy link

machak commented Jun 1, 2021

Unless I am missing something, there is no way to control cookie at the moment. I don't care so much about the cookie name, but I would like to have a control about cookie value/time/path and other options.
(and a big thanks for providing the library ;-) )

@machak machak changed the title Add possibility to control setting cookie Add possibility to control cookie settings Jun 1, 2021
@Dan6erbond
Copy link
Owner

Thank you for creating this issue! Those are all good points! I am currently working on many ideas to improve the flexibility of this library, and how cookies are handled is at the top of the list. I think I will avoid any cookie() callbacks that let you define those properties, but instead would like to make it easier to inherit from the base SvelteKitAuth class and just override the specific methods to get the functionality you need.

This goes right into other issues I'm working on at the moment (sparingly, as I'm busy and this project kind of sprung up at an unexpected time for me during the work on another SvelteKit app) - as I would like to allow providers to return metadata that define the routes they can handle, with methods and all, so I see something similar being the case for this, with functions that define the metadata for cookies (such as path, time, and other flags) as well as a method that generates the JWT and a method to return Set-Cookie headers which can be overriden.

@Dan6erbond Dan6erbond self-assigned this Jun 1, 2021
@Dan6erbond Dan6erbond added help wanted Extra attention is needed enhancement New feature or request labels Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants