Skip to main content

Module rememberable

Module rememberable 

Source
Expand description

rememberable module — a persistent “remember me” cookie that signs the user back in across browser sessions (the Devise rememberable analogue). Stamps remember_created_at and issues a signed, Max-Age-bearing cookie; a RememberStrategy resolves it on later requests when no session is present.

Structs§

RememberStrategy
Auth strategy that resolves an identity from the signed remember cookie. Added to the strategy chain automatically when the rememberable module is enabled, so it only runs after the session/JWT strategies decline.

Constants§

REMEMBER_COOKIE
Signed cookie holding the remembered user id.

Functions§

cookie_value
The signed cookie value for a remembered user id (its JSON encoding, so it round-trips back to AuthUser::Id).
forget
Clear remember_created_at for email (on sign-out). No-op when disabled.
record_remember
Stamp remember_created_at for email. No-op when the module is disabled.