Skip to content

[auth_jwt] Using database.secret as cookie secret #815

@jesusVMayor

Description

@jesusVMayor

Hi, i'm starting to work with auth_jwt with cookies, and I'm seeing some things that i see as inconsistent.

_get_jwt_cookie_secret function is returning allways the database.secret parameter, and is used to call _encode and _decode in ir.http functions, that means that we don't have a way to use the validator secret_key field as secret key, and there will be allways only one secret key for all validator and always will be the database secret.

  • Why not use the secret_key field of the validator to encode and decode?
  • Another thing that im don't know if is a bug, _auth_method_jwt is always setting the cookie again, with the cookie_max_age parameter of the validator, why not let the client handle the expiration of the cookie?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions