feat(passkey): allow for attestationType: "direct"#8822
Open
JuanM04 wants to merge 2 commits intobetter-auth:mainfrom
Open
feat(passkey): allow for attestationType: "direct"#8822JuanM04 wants to merge 2 commits intobetter-auth:mainfrom
attestationType: "direct"#8822JuanM04 wants to merge 2 commits intobetter-auth:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@JuanM04 is attempting to deploy a commit to the better-auth Team on Vercel. A member of the Team first needs to authorize it. |
@better-auth/api-key
better-auth
auth
@better-auth/core
@better-auth/drizzle-adapter
@better-auth/electron
@better-auth/expo
@better-auth/i18n
@better-auth/kysely-adapter
@better-auth/memory-adapter
@better-auth/mongo-adapter
@better-auth/oauth-provider
@better-auth/passkey
@better-auth/prisma-adapter
@better-auth/redis-storage
@better-auth/scim
@better-auth/sso
@better-auth/stripe
@better-auth/telemetry
@better-auth/test-utils
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
Enables configuring WebAuthn attestation conveyance preference for the passkey plugin so relying parties can request "direct" attestation (instead of always using "none"), with corresponding documentation updates.
Changes:
- Added
attestationType?: "none" | "direct"toPasskeyOptions. - Forwarded
opts.attestationTypeintogenerateRegistrationOptions(defaulting to"none"). - Documented the new
attestationTypeoption in the passkey plugin docs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/passkey/src/types.ts | Adds the attestationType option to the plugin configuration type. |
| packages/passkey/src/routes.ts | Uses configured attestationType when generating registration options. |
| docs/content/docs/plugins/passkey.mdx | Documents attestationType and its behavior/default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Following what's described in #6371 (and old PR #2466), this PR allows for
attestationType: "direct". This implies always requesting AAGUID from the passkey provider, since with"none"it sometimes defaulted to00000000-0000-0000-0000-000000000000.Summary by cubic
Add support for
attestationType: "direct"in passkey registration while keeping the default"none". Added tests to ensure the default and forwarding behavior.attestationType?: "none" | "direct"toPasskeyOptions.opts.attestationTypeto registration; fallback to"none".attestationTypeindocs/plugins/passkey.mdxand add tests for default"none"and"direct".Written for commit bd57d04. Summary will update on new commits.