Skip to content

fix: support 'auth' header type and raw-byte signature encoding - #552

Open
dajiaohuang wants to merge 2 commits into
framesjs:mainfrom
dajiaohuang:fix/551-auth-header-and-raw-signature
Open

fix: support 'auth' header type and raw-byte signature encoding#552
dajiaohuang wants to merge 2 commits into
framesjs:mainfrom
dajiaohuang:fix/551-auth-header-and-raw-signature

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

This PR fixes two bugs in the JSON signature verification that cause 78% of live mini app manifests to be incorrectly rejected.

Bug 1: 'auth' header type is rejected

The function only accepted and types, but the spec also allows . This PR adds to the accepted types.

Bug 2: Raw-byte signature encoding not supported

The function only accepted ASCII-hex encoded signatures (e.g., ), but many live manifests use raw 65-byte signatures encoded as base64url. This PR detects the encoding format and handles both cases.

Changes

  • : Added to the type union
  • : Added to the allowed types array
  • : Added logic to detect and handle both ASCII-hex and raw-byte encodings

Testing

The fix allows the previously rejected valid signatures to be verified correctly.

Fixes #551

- Add 'auth' to accepted header types in decodeHeader
- Support both ASCII-hex and raw-byte signature encodings in decodeCustodyTypeSignature

Fixes framesjs#551
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@dajiaohuang is attempting to deploy a commit to the Discove Team on Vercel.

A member of the Team first needs to authorize it.

@vercel vercel Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

auth-type account associations are silently routed through the custody verification path, so custodyOf(fid) === authAddress is always false and valid auth manifests are always rejected.

Fix on Vercel

Comment thread packages/frames.js/src/farcaster-v2/json-signature.ts Outdated
@dajiaohuang

Copy link
Copy Markdown
Author

Addressed the current review feedback in 4121a93. Auth signatures now return after message verification instead of being compared to custodyOf(fid), which rejects delegated auth addresses; odd-length ASCII hex signatures remain decoded as hex. Validation: git diff --check passed. The local checkout has no Yarn binary/dependencies, so the package test suite could not run here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parseFramesV2Manifest rejects 78% of live mini app manifests: auth header type and the raw-byte signature encoding

1 participant