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 cookie configuration to derive and hooks #906

Open
cortopy opened this issue Nov 1, 2024 · 0 comments
Open

Add cookie configuration to derive and hooks #906

cortopy opened this issue Nov 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cortopy
Copy link

cortopy commented Nov 1, 2024

What is the problem this feature would solve?

In an auth plugin that uses derive to set cookies, I'm unable to use configuration to sign the cookies.

As per these two issues, #766, #334, a guard can be used to validate, but I've not been able to find a method to pass cookie.secrets to sign the key

What is the feature you are proposing to solve the problem?

Sign cookies in plugins

What alternatives have you considered?

  • pass cookie config in Elysia constructor (this seems to be ignored altogethere)
  • pass a this argument to derive that is similar to the extra argument in handlers but this is not allowed
  • use cookie.secrets programatically, but this doesn't seem to have any effect
@cortopy cortopy added the enhancement New feature or request label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant