Skip to content

Add cookie configuration to derive and hooks #906

Open
@cortopy

Description

@cortopy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions