enlace_auth.auth.cookies#

Signed cookie helpers built on itsdangerous.

We wrap URLSafeTimedSerializer so signing_key rotation and max_age checks are centralised; callers never touch itsdangerous directly.

Functions

sign_cookie(value, signing_key, *[, salt])

Return a signed, URL-safe token carrying value.

verify_cookie(token, signing_key, *[, ...])

Return the original value iff the token is valid and unexpired.

Return a signed, URL-safe token carrying value.

Return type:

str

Return the original value iff the token is valid and unexpired.

Return type:

Optional[str]