[PR #557] [MERGED] fix: correct parameter order for password verification method #20263

Closed
opened 2026-04-15 19:34:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/557
Author: @yasseralsaidi
Created: 11/16/2024
Status: Merged
Merged: 11/17/2024
Merged by: @Bekacru

Base: mainHead: main


📝 Commits (1)

  • 1898aaf fix: correct parameter order for password verification method

📊 Changes

1 file changed (+14 additions, -15 deletions)

View changed files

📝 packages/better-auth/src/init.ts (+14 -15)

📄 Description

Corrected the parameter order for the verify method: Updated the verify function to accept password as the first argument and hash as the second argument.

// BetterAuthOptions types

password: {
		...
		verify?: (password: string, hash: string) => Promise<boolean>;

// verifyPassword function

export const verifyPassword = async (hash: string, password: string) => {...}

🔄 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/557 **Author:** [@yasseralsaidi](https://github.com/yasseralsaidi) **Created:** 11/16/2024 **Status:** ✅ Merged **Merged:** 11/17/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`1898aaf`](https://github.com/better-auth/better-auth/commit/1898aaf83c97dbc05d58f8986327c386892bb30c) fix: correct parameter order for password verification method ### 📊 Changes **1 file changed** (+14 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/init.ts` (+14 -15) </details> ### 📄 Description Corrected the parameter order for the verify method: Updated the verify function to accept password as the first argument and hash as the second argument. // BetterAuthOptions types ```js password: { ... verify?: (password: string, hash: string) => Promise<boolean>; ``` // verifyPassword function ```js export const verifyPassword = async (hash: string, password: string) => {...} ``` --- <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-15 19:34:43 -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#20263