[PR #7441] [MERGED] feat(admin): make password field optional on create user #7313

Closed
opened 2026-03-13 13:31:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7441
Author: @Bekacru
Created: 1/17/2026
Status: Merged
Merged: 1/18/2026
Merged by: @Bekacru

Base: canaryHead: cursor/admin-plugin-password-optional-da00


📝 Commits (1)

  • e0a6f33 feat(admin): make password optional when creating users

📊 Changes

2 files changed (+49 additions, -10 deletions)

View changed files

📝 packages/better-auth/src/plugins/admin/admin.test.ts (+33 -0)
📝 packages/better-auth/src/plugins/admin/routes.ts (+16 -10)

📄 Description

Make the password field optional in the admin plugin's createUser endpoint to support users logging in via magic link or social login.

closes #4226

Summary by cubic

Make the password field optional in the admin plugin’s createUser endpoint so admins can create passwordless users for magic link or social login. Addresses Linear #4226.

  • New Features
    • Password is optional; credential account is linked only when a password is provided.
    • Added tests to confirm passwordless users can’t sign in with a password until credentials exist.

Written for commit e0a6f33806. Summary will update 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/7441 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 1/17/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `cursor/admin-plugin-password-optional-da00` --- ### 📝 Commits (1) - [`e0a6f33`](https://github.com/better-auth/better-auth/commit/e0a6f338069be2bb70644172bf821081f517c483) feat(admin): make password optional when creating users ### 📊 Changes **2 files changed** (+49 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+33 -0) 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+16 -10) </details> ### 📄 Description Make the password field optional in the admin plugin's `createUser` endpoint to support users logging in via magic link or social login. closes #4226 ## Summary by cubic Make the password field optional in the admin plugin’s createUser endpoint so admins can create passwordless users for magic link or social login. Addresses Linear #4226. - **New Features** - Password is optional; credential account is linked only when a password is provided. - Added tests to confirm passwordless users can’t sign in with a password until credentials exist. <sup>Written for commit e0a6f338069be2bb70644172bf821081f517c483. Summary will update 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-03-13 13:31:41 -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#7313