[PR #1250] [MERGED] fix(passkey): getRpID did not trim path when baseURL has no port #3715

Closed
opened 2026-03-13 11:07:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1250
Author: @canstand
Created: 1/20/2025
Status: Merged
Merged: 1/20/2025
Merged by: @Bekacru

Base: mainHead: fix-passkey-getrpid


📝 Commits (1)

  • 85b9e06 fix(passkey): getRpID did not trim path when baseURL has no port

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/passkey/index.ts (+1 -3)

📄 Description

Before:

getRpID({}, "http://example.com/api/auth")
// example.com/api/auth
getRpID({}, "http://example.com:8080/api/auth")
// example.com

which invalid in @simplewebauthn/browser

After:

getRpID({}, "http://example.com/api/auth")
// example.com
getRpID({}, "http://example.com:8080/api/auth")
// example.com

🔄 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/1250 **Author:** [@canstand](https://github.com/canstand) **Created:** 1/20/2025 **Status:** ✅ Merged **Merged:** 1/20/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix-passkey-getrpid` --- ### 📝 Commits (1) - [`85b9e06`](https://github.com/better-auth/better-auth/commit/85b9e061c7655af1c7f2897e116976043356d664) fix(passkey): getRpID did not trim path when baseURL has no port ### 📊 Changes **1 file changed** (+1 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+1 -3) </details> ### 📄 Description Before: ```js getRpID({}, "http://example.com/api/auth") // example.com/api/auth getRpID({}, "http://example.com:8080/api/auth") // example.com ``` which invalid in `@simplewebauthn/browser` After: ```js getRpID({}, "http://example.com/api/auth") // example.com getRpID({}, "http://example.com:8080/api/auth") // example.com ``` --- <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 11:07:38 -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#3715