[PR #6413] [MERGED] feat(expo): last-login-method client plugin #32249

Closed
opened 2026-04-17 23:05:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6413
Author: @jslno
Created: 11/30/2025
Status: Merged
Merged: 12/9/2025
Merged by: @Bekacru

Base: canaryHead: 11-30-2025/custom-get-last-login-method


📝 Commits (10+)

  • ec83bb4 feat(last-login-method): allow custom get and clear method for client
  • c8c6a78 chore: fix linting
  • 454910d feat: add optional client-side resolver
  • 2ea77a3 chore: fix linting
  • ef4e792 refactor: single resovle method
  • 5c0c02a chore: fix linting
  • 834d2a0 Merge branch 'canary' into 11-30-2025/custom-get-last-login-method
  • 0e8a68a chore: cleanup
  • e68dba7 Merge branch 'canary' into 11-30-2025/custom-get-last-login-method
  • 1abd056 chore: add tests

📊 Changes

6 files changed (+239 additions, -1 deletions)

View changed files

📝 docs/content/docs/plugins/last-login-method.mdx (+27 -0)
📝 packages/expo/package.json (+8 -0)
packages/expo/src/plugins/index.ts (+1 -0)
packages/expo/src/plugins/last-login-method.ts (+96 -0)
packages/expo/test/last-login-method.test.ts (+106 -0)
📝 packages/expo/tsdown.config.ts (+1 -1)

📄 Description

closes #6409


Summary by cubic

Added an Expo client plugin to resolve and store the last login method in native apps using a fetch plugin and secure storage. Improves parity across web and native clients without relying on cookies.

  • New Features
    • lastLoginMethodClient in @better-auth/expo/plugins with storage and optional storagePrefix.
    • customResolveMethod to override route-based detection; default supports callback/email/siwe/passkey.
    • Client actions: getLastUsedLoginMethod, clearLastUsedLoginMethod, isLastUsedLoginMethod.

Written for commit cac15a91d8. 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/6413 **Author:** [@jslno](https://github.com/jslno) **Created:** 11/30/2025 **Status:** ✅ Merged **Merged:** 12/9/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `11-30-2025/custom-get-last-login-method` --- ### 📝 Commits (10+) - [`ec83bb4`](https://github.com/better-auth/better-auth/commit/ec83bb4cf32c3c50f78b6c22aeaf86668280fb63) feat(last-login-method): allow custom get and clear method for client - [`c8c6a78`](https://github.com/better-auth/better-auth/commit/c8c6a78701cf552692390a7721b92507768bf777) chore: fix linting - [`454910d`](https://github.com/better-auth/better-auth/commit/454910dbf288a9ab883d0e699c63cc771c3ed12d) feat: add optional client-side resolver - [`2ea77a3`](https://github.com/better-auth/better-auth/commit/2ea77a394a007f931993c80913dfaeef1c31e47b) chore: fix linting - [`ef4e792`](https://github.com/better-auth/better-auth/commit/ef4e7923122c8b4d515d0c8b712d922f89fd428a) refactor: single resovle method - [`5c0c02a`](https://github.com/better-auth/better-auth/commit/5c0c02a3ea8f1269c3197cd9d79c103d662163bd) chore: fix linting - [`834d2a0`](https://github.com/better-auth/better-auth/commit/834d2a0da5824bbb3d348b2b8d4d161fdffbf7b4) Merge branch 'canary' into 11-30-2025/custom-get-last-login-method - [`0e8a68a`](https://github.com/better-auth/better-auth/commit/0e8a68af45be3b3c96e514589da3a965bd8983ed) chore: cleanup - [`e68dba7`](https://github.com/better-auth/better-auth/commit/e68dba72d12e9f88b0f4273ad0ffea3ecc3819de) Merge branch 'canary' into 11-30-2025/custom-get-last-login-method - [`1abd056`](https://github.com/better-auth/better-auth/commit/1abd0562cae4d6e9d7ddcecec3696f73738f3242) chore: add tests ### 📊 Changes **6 files changed** (+239 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/last-login-method.mdx` (+27 -0) 📝 `packages/expo/package.json` (+8 -0) ➕ `packages/expo/src/plugins/index.ts` (+1 -0) ➕ `packages/expo/src/plugins/last-login-method.ts` (+96 -0) ➕ `packages/expo/test/last-login-method.test.ts` (+106 -0) 📝 `packages/expo/tsdown.config.ts` (+1 -1) </details> ### 📄 Description closes #6409 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added an Expo client plugin to resolve and store the last login method in native apps using a fetch plugin and secure storage. Improves parity across web and native clients without relying on cookies. - **New Features** - lastLoginMethodClient in @better-auth/expo/plugins with storage and optional storagePrefix. - customResolveMethod to override route-based detection; default supports callback/email/siwe/passkey. - Client actions: getLastUsedLoginMethod, clearLastUsedLoginMethod, isLastUsedLoginMethod. <sup>Written for commit cac15a91d86400df5ae7ecb05e22096f38833c84. 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 23:05:35 -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#32249