[PR #5753] feat(last-login-method): beforeStoreCookie option for GDPR compliance #14448

Open
opened 2026-04-13 09:28:47 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5753

State: open
Merged: No


TLDR:

Adds a beforeStoreCookie hook to the lastLoginMethod plugin that lets you conditionally allow or block storing the last login method cookie (e.g., for GDPR consent), without affecting authentication flow.

issue: https://github.com/better-auth/better-auth/issues/5727
linear: https://linear.app/better-auth/issue/ENG-552/feat-make-lastloginmethod-plugin-have-cookie-gdpr-compliance

  • tests
  • docs
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5753 **State:** open **Merged:** No --- ### TLDR: Adds a `beforeStoreCookie` hook to the `lastLoginMethod` plugin that lets you conditionally allow or block storing the last login method cookie (e.g., for GDPR consent), without affecting authentication flow. issue: https://github.com/better-auth/better-auth/issues/5727 linear: https://linear.app/better-auth/issue/ENG-552/feat-make-lastloginmethod-plugin-have-cookie-gdpr-compliance - [x] tests - [x] docs
GiteaMirror added the pull-request label 2026-04-13 09:28:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14448