[PR #4761] [MERGED] v1.3.13 #31168

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

📋 Pull Request Information

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

Base: v1.3.x-latestHead: v1.3.x-staging


📝 Commits (5)

  • 0e09254 feat(last-login-method): update OAuth login method tracking for multiple auth type (#4693)
  • c7ffaf2 feat: add returnHeaders to getSession (#3983)
  • 0a3bf8f fix(organization): remove autoCreateOnSignUp option as it's not implemented yet (#4755)
  • fd05988 fix(passkey): remove email from query (#4740)
  • 5ad8823 fix(client): baseURL is undefined for SSR (#4760)

📊 Changes

11 files changed (+329 additions, -37 deletions)

View changed files

📝 docs/content/docs/plugins/passkey.mdx (+0 -8)
📝 packages/better-auth/src/api/routes/session-api.test.ts (+84 -1)
packages/better-auth/src/client/client-ssr.test.ts (+25 -0)
📝 packages/better-auth/src/client/config.ts (+2 -1)
📝 packages/better-auth/src/plugins/last-login-method/index.ts (+22 -0)
📝 packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts (+171 -2)
📝 packages/better-auth/src/plugins/organization/types.ts (+0 -6)
📝 packages/better-auth/src/plugins/passkey/client.ts (+0 -4)
📝 packages/better-auth/src/plugins/passkey/index.ts (+0 -10)
📝 packages/better-auth/src/plugins/passkey/passkey.test.ts (+9 -0)
📝 packages/better-auth/src/types/api.ts (+16 -5)

📄 Description

Summary by cubic

Adds returnHeaders to getSession and sets a safe default baseURL (/api/auth) for SSR clients. Also persists the last used login method in the database, removes the passkey email param, and drops an unimplemented organization option.

  • New Features

    • getSession supports returnHeaders, with correct typing and asResponse precedence.
    • lastLoginMethod plugin saves lastLoginMethod on session create (works with email and OAuth).
  • Bug Fixes

    • SSR: default client baseURL to /api/auth when undefined.
    • Passkey: remove email from generate-authenticate-options and client signIn.passkey; docs updated.
    • Organization: remove unused autoCreateOrganizationOnSignUp option.

🔄 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/4761 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/19/2025 **Status:** ✅ Merged **Merged:** 9/19/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `v1.3.x-latest` ← **Head:** `v1.3.x-staging` --- ### 📝 Commits (5) - [`0e09254`](https://github.com/better-auth/better-auth/commit/0e09254c319c6ad38754a143a1ae7097d3495136) feat(last-login-method): update OAuth login method tracking for multiple auth type (#4693) - [`c7ffaf2`](https://github.com/better-auth/better-auth/commit/c7ffaf2d4735c09d477554122a461aed7f23bcaf) feat: add `returnHeaders` to `getSession` (#3983) - [`0a3bf8f`](https://github.com/better-auth/better-auth/commit/0a3bf8f3325b46e7dcf9c8f2567ef19ffb3ea642) fix(organization): remove `autoCreateOnSignUp` option as it's not implemented yet (#4755) - [`fd05988`](https://github.com/better-auth/better-auth/commit/fd0598814172090ff3acff5b988671007ef3346b) fix(passkey): remove `email` from query (#4740) - [`5ad8823`](https://github.com/better-auth/better-auth/commit/5ad882324327995b07f799e4e8a97e68df88a684) fix(client): baseURL is undefined for SSR (#4760) ### 📊 Changes **11 files changed** (+329 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/passkey.mdx` (+0 -8) 📝 `packages/better-auth/src/api/routes/session-api.test.ts` (+84 -1) ➕ `packages/better-auth/src/client/client-ssr.test.ts` (+25 -0) 📝 `packages/better-auth/src/client/config.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/last-login-method/index.ts` (+22 -0) 📝 `packages/better-auth/src/plugins/last-login-method/last-login-method.test.ts` (+171 -2) 📝 `packages/better-auth/src/plugins/organization/types.ts` (+0 -6) 📝 `packages/better-auth/src/plugins/passkey/client.ts` (+0 -4) 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+0 -10) 📝 `packages/better-auth/src/plugins/passkey/passkey.test.ts` (+9 -0) 📝 `packages/better-auth/src/types/api.ts` (+16 -5) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds returnHeaders to getSession and sets a safe default baseURL (/api/auth) for SSR clients. Also persists the last used login method in the database, removes the passkey email param, and drops an unimplemented organization option. - **New Features** - getSession supports returnHeaders, with correct typing and asResponse precedence. - lastLoginMethod plugin saves lastLoginMethod on session create (works with email and OAuth). - **Bug Fixes** - SSR: default client baseURL to /api/auth when undefined. - Passkey: remove email from generate-authenticate-options and client signIn.passkey; docs updated. - Organization: remove unused autoCreateOrganizationOnSignUp option. <!-- 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:05:12 -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#31168