Skip to content

Commit c8970f9

Browse files
authored
Merge pull request #20135 from mozilla/FXA-13064
feat(passkeys): Add passkey manager functions
2 parents 54acdfe + e15be32 commit c8970f9

8 files changed

Lines changed: 904 additions & 89 deletions

libs/accounts/passkey/jest.config.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ const config: Config = {
1010
},
1111
moduleFileExtensions: ['ts', 'js', 'html'],
1212
coverageDirectory: '../../../coverage/libs/accounts/passkey',
13-
reporters: [
14-
'default',
15-
[
16-
'jest-junit',
17-
{
18-
outputDirectory: 'artifacts/tests/accounts-passkey',
19-
// It is critical that the package_name here is unique among all
20-
// Jest configs. This file is uploaded to GCS and will error on upload
21-
// if not unique because permissions for the upload deliberately prevent
22-
// overwriting files.
23-
outputName: 'accounts-passkey-jest-unit-results.xml',
24-
},
25-
],
26-
],
13+
...(process.env['CI']
14+
? {
15+
reporters: [
16+
'default',
17+
[
18+
'jest-junit',
19+
{
20+
outputDirectory: 'artifacts/tests/accounts-passkey',
21+
// It is critical that the package_name here is unique among all
22+
// Jest configs. This file is uploaded to GCS and will error on upload
23+
// if not unique because permissions for the upload deliberately prevent
24+
// overwriting files.
25+
outputName: 'accounts-passkey-jest-unit-results.xml',
26+
},
27+
],
28+
],
29+
}
30+
: {}),
2731
};
2832

2933
export default config;

libs/accounts/passkey/src/lib/passkey.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class PasskeyConfig {
5252
* Maximum number of passkeys a user can register.
5353
*/
5454
@IsNumber()
55-
public maxPasskeysPerUser?: number;
55+
public maxPasskeysPerUser!: number;
5656

5757
/**
5858
* Challenge expiration timeout in milliseconds.

libs/accounts/passkey/src/lib/passkey.errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class PasskeyError extends BaseError {
2424
/** WebAuthn credential ID (when applicable) */
2525
readonly credentialId?: string;
2626
/** Additional structured context */
27-
readonly context: Record<string, any>;
27+
readonly context: Record<string, unknown>;
2828

2929
/**
3030
* Creates a PasskeyError.
@@ -42,7 +42,7 @@ export class PasskeyError extends BaseError {
4242
message: string,
4343
info: { errno?: number; uid?: string; credentialId?: string } & Record<
4444
string,
45-
any
45+
unknown
4646
>,
4747
cause?: Error
4848
) {

0 commit comments

Comments
 (0)