[PR #5298] [CLOSED] fix: narrow type for publicKey to use Uint8Array for decoding #14158

Closed
opened 2026-04-13 09:20:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5298
Author: @Kinfe123
Created: 10/14/2025
Status: Closed

Base: canaryHead: fix/narrow-type-for-passkey-public-key


📝 Commits (1)

  • 0727128 fix: narrow type for publicKey to use Uint8Array for decoding

📊 Changes

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

View changed files

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

📄 Description

after migrating to tsdown which uses rolldown it is casuing a ts type issue which is good since the previous which is unbuild uses rollup which also uses esbuild for transpilation and does not do strictly check for dts generated and type match. so ig from now we can narrow the types like this one to add new Unit8Array since the decode return is - Uint8Array which is not the same with Uint8Array that webauthn is expecting so there is a typecheck issue and the ci is also failing because of this. this also a runtime agnostic. it can run on cf , deno and other runtimes and the api is already supported


🔄 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/5298 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 10/14/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/narrow-type-for-passkey-public-key` --- ### 📝 Commits (1) - [`0727128`](https://github.com/better-auth/better-auth/commit/07271288a4817837570c7766433b3f7b54cee4a5) fix: narrow type for publicKey to use Uint8Array for decoding ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/passkey/index.ts` (+1 -1) </details> ### 📄 Description after migrating to tsdown which uses rolldown it is casuing a ts type issue which is good since the previous which is unbuild uses rollup which also uses esbuild for transpilation and does not do strictly check for dts generated and type match. so ig from now we can narrow the types like this one to add new Unit8Array since the decode return is - Uint8Array<ArrayBufferLike> which is not the same with Uint8Array<ArrayBuffer> that webauthn is expecting so there is a typecheck issue and the ci is also failing because of this. this also a runtime agnostic. it can run on cf , deno and other runtimes and the api is already supported --- <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-13 09:20:24 -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#14158