[PR #4350] [MERGED] fix(last-login-method): cookie name inconsistent #22226

Closed
opened 2026-04-15 20:53:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4350
Author: @himself65
Created: 9/1/2025
Status: Merged
Merged: 9/1/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/01/cookie-name


📝 Commits (1)

  • 02c5107 fix(last-login-method): cookie name inconsistent

📊 Changes

3 files changed (+4 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/plugins/last-login-method/client.ts (+2 -2)
📝 packages/better-auth/src/plugins/last-login-method/index.ts (+1 -1)
📝 packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts (+1 -1)

📄 Description

Fixes: 2db142465e

Summary by cubic

Standardized the last login method cookie name to "better-auth.last_used_login_method" across client and server. This removes inconsistency and ensures the value is read and written reliably.

  • Bug Fixes

    • Use "better-auth.last_used_login_method" as the default cookieName in client and server.
    • Updated tests to expect the new cookie name.
  • Migration

    • If you rely on "last_used_login_method", set cookieName: "last_used_login_method" in your config or read both names during rollout.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4350 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/1/2025 **Status:** ✅ Merged **Merged:** 9/1/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/01/cookie-name` --- ### 📝 Commits (1) - [`02c5107`](https://github.com/better-auth/better-auth/commit/02c510760061c68081c40292c0a353c89f0a1ceb) fix(last-login-method): cookie name inconsistent ### 📊 Changes **3 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/last-login-method/client.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/last-login-method/index.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts` (+1 -1) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/commit/2db142465ecf29575bb1edf4e59173daf7ecd498 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Standardized the last login method cookie name to "better-auth.last_used_login_method" across client and server. This removes inconsistency and ensures the value is read and written reliably. - **Bug Fixes** - Use "better-auth.last_used_login_method" as the default cookieName in client and server. - Updated tests to expect the new cookie name. - **Migration** - If you rely on "last_used_login_method", set cookieName: "last_used_login_method" in your config or read both names during rollout. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 20:53:53 -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#22226