feat(baileys): add passkey companion-linking ceremony#2628
Open
mateus2001ferreira wants to merge 1 commit into
Open
feat(baileys): add passkey companion-linking ceremony#2628mateus2001ferreira wants to merge 1 commit into
mateus2001ferreira wants to merge 1 commit into
Conversation
Add opt-in support for WhatsApp's passkey (Shortcake/CRSC) companion-linking flow, implemented on top of Baileys' public API without forking it. A browser helper extension performs the WebAuthn assertion; the ceremony is driven via public /passkey-ceremony endpoints and exposed through connectionState. Gated behind PASSKEY_CEREMONY_ENABLED (default off) since a malformed IQ can get the number banned. Requires PASSKEY_PUBLIC_URL reachable by the browser.
Contributor
There was a problem hiding this comment.
Sorry @mateus2001ferreira, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds opt-in support for WhatsApp's passkey (Shortcake/CRSC) companion-linking flow, which some numbers now require when linking a device. Implemented on top of Baileys' public API — no fork or patch of Baileys needed.
How it works:
PasskeyCeremonyhandles the server'spasskey_prologue_request/crsc_continuationnotifications and replies with the matching IQs (passkey_prologue,companion_nonce,encrypted_pairing_request).GET/POST /passkey-ceremony/:token[/response|/confirm]let the extension read the challenge and submit the assertion; the current stage and open URL are exposed viaconnectionState.Gated behind
PASSKEY_CEREMONY_ENABLED=true(default off), since a malformed IQ can get a number banned. Also requires:PASSKEY_PUBLIC_URL— API base reachable by the browser running WhatsApp WebCORS_ORIGINallowing*orhttps://web.whatsapp.comCrypto is an independent reimplementation of whatsmeow's
pair-passkey.go(MPL-2.0); no code copied. No dependency changes (works on the current Baileys 7.0.0-rc.9).Type of Change
Checklist
Additional Notes
The feature ships a small browser helper extension (
public/passkey-helper.zip) that performs the WebAuthn assertion. Happy to discuss whether shipping it in-repo, as source, or as a separate distribution is preferable. Also glad to add the two env vars to.env.exampleif the approach is accepted.