Skip to content

feat(passkeys): add auth server passkey configs#20133

Open
MagentaManifold wants to merge 1 commit intomainfrom
FXA-13057
Open

feat(passkeys): add auth server passkey configs#20133
MagentaManifold wants to merge 1 commit intomainfrom
FXA-13057

Conversation

@MagentaManifold
Copy link
Contributor

Because

  • we need to load passkey configs into auth server

This pull request

  • defines convict passkey configs

Issue that this pull request solves

Closes: FXA-13057

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@MagentaManifold MagentaManifold requested a review from a team as a code owner March 3, 2026 17:50
Copy link
Contributor Author

@MagentaManifold MagentaManifold left a comment

Choose a reason for hiding this comment

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

(I didn't feel the need to add a new section in README.md, with inline documentation being sufficiently detailed.)

format: ['required', 'preferred', 'discouraged'],
},
authenticatorAttachment: {
default: null,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure it default should be null or undefined. Passkey config service uses undefined, but null seems more idiomatic for convict.

},
},
challengeTimeout: {
default: 60000,
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be a bit short. For reference, the spec recommends 300000 or 5 min:
https://w3c.github.io/webauthn/#sctn-timeout-recommended-range

format: ['required', 'preferred', 'discouraged'],
},
residentKey: {
default: 'preferred',
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use required as default, otherwise credentials may not be discoverable.

default: [],
doc: 'List of allowed origins for WebAuthn registration and authentication ceremonies. Must be full origins (scheme + host + optional port), e.g. ["https://accounts.firefox.com"]. Must have at least one entry when passkeys are enabled.',
env: 'PASSKEYS__ALLOWED_ORIGINS',
format: (val: unknown) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should just be Array, and validation should be handled in the PasskeyConfig. We shouldn't throw here.

}
}

// Required passkey configs
Copy link
Contributor

Choose a reason for hiding this comment

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

Passkey config is not required for core server infra, we must not throw here. This entire check should be removed from convict config and should be handled either in the feature gating (isPasskeyFeatureEnabled) or in the PasskeyConfigProvider (to be added).

);
Container.set(RecoveryPhoneService, recoveryPhoneService);

const passkeyConfig = buildPasskeyConfig(config.passkeys, log);
Copy link
Contributor Author

@MagentaManifold MagentaManifold Mar 5, 2026

Choose a reason for hiding this comment

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

Added these just to demonstrate how it will be used in auth-server. Remove before merging

Because:

* we need to load passkey configs to auth server

This commit:

* defines convict passkey configs

Closes FXA-13057
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.

2 participants