[PR #4673] [MERGED] fix: prevent lastLoginMethod plugin from setting cookie on failed auth #5519

Closed
opened 2026-03-13 12:25:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: canaryHead: fix/last-login-method-cookie-on-failed-auth


📝 Commits (4)

  • ec8ef0b fix: tiktok scope
  • 99b9c43 fix: prevent lastLoginMethod plugin from setting cookie on failed authentication
  • dae941d lint
  • e7a8055 lint

📊 Changes

2 files changed (+58 additions, -12 deletions)

View changed files

📝 packages/better-auth/src/plugins/last-login-method/index.ts (+19 -12)
📝 packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts (+39 -0)

📄 Description

closes #4626


🔄 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/4673 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 9/15/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/last-login-method-cookie-on-failed-auth` --- ### 📝 Commits (4) - [`ec8ef0b`](https://github.com/better-auth/better-auth/commit/ec8ef0b984da56435de1c1518f7bc6c1fa3f59e3) fix: tiktok scope - [`99b9c43`](https://github.com/better-auth/better-auth/commit/99b9c43f0a933fe9931879bccb816cec7c90b84b) fix: prevent lastLoginMethod plugin from setting cookie on failed authentication - [`dae941d`](https://github.com/better-auth/better-auth/commit/dae941de6ad7c13b235e2ac36975803e4801cd6d) lint - [`e7a8055`](https://github.com/better-auth/better-auth/commit/e7a8055a5e96d6bac4f861dadfa3476e63a1a237) lint ### 📊 Changes **2 files changed** (+58 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/last-login-method/index.ts` (+19 -12) 📝 `packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts` (+39 -0) </details> ### 📄 Description closes #4626 --- <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-03-13 12:25:48 -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#5519