[PR #6154] [MERGED] fix(last-login-method): detect passkey login to set last used method #32087

Closed
opened 2026-04-17 22:57:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6154
Author: @GautamBytes
Created: 11/21/2025
Status: Merged
Merged: 11/21/2025
Merged by: @Bekacru

Base: canaryHead: fix/passkey-last-login-method


📝 Commits (1)

  • f7ac6b5 fix(last-login-method): add support for passkey login detection

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

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

📄 Description

Description

This PR fixes an issue where logging in with a Passkey resulted in the better-auth.last_used_login_method cookie being empty (or null).

The last-login-method plugin's default resolver was missing the check for the specific Passkey verification endpoint.

Changes

  • Added a check for /passkey/verify-authentication in the defaultResolveMethod function within last-login-method/index.ts.

Closes #6128


Summary by cubic

Fixes last-login-method so passkey logins are detected and the better-auth.last_used_login_method cookie is set to "passkey". Adds a check for /passkey/verify-authentication in the plugin’s defaultResolveMethod.

Written for commit f7ac6b511a. Summary will update automatically on new commits.


🔄 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/6154 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 11/21/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/passkey-last-login-method` --- ### 📝 Commits (1) - [`f7ac6b5`](https://github.com/better-auth/better-auth/commit/f7ac6b511a28fcea57edd4b454dabf103af9ddc1) fix(last-login-method): add support for passkey login detection ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/last-login-method/index.ts` (+1 -0) </details> ### 📄 Description ## Description This PR fixes an issue where logging in with a Passkey resulted in the `better-auth.last_used_login_method` cookie being empty (or null). The `last-login-method` plugin's default resolver was missing the check for the specific Passkey verification endpoint. ## Changes - Added a check for `/passkey/verify-authentication` in the `defaultResolveMethod` function within `last-login-method/index.ts`. Closes #6128 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes last-login-method so passkey logins are detected and the better-auth.last_used_login_method cookie is set to "passkey". Adds a check for /passkey/verify-authentication in the plugin’s defaultResolveMethod. <sup>Written for commit f7ac6b511a28fcea57edd4b454dabf103af9ddc1. Summary will update automatically on new commits.</sup> <!-- 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-17 22:57:06 -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#32087