Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
629f8ac
passkey config admin changes
pragatimodi Oct 4, 2023
a2c2431
Bug Fix for issue #2320 (#2321)
rishabhAjay Oct 3, 2023
62b0003
fixed unit test errors
dependabot[bot] Oct 4, 2023
f0b0ea6
lint fixes + integration
dependabot[bot] Oct 12, 2023
ac9a82f
remove integration tests
pragatimodi Oct 18, 2023
b40b1ab
adding comments
pragatimodi Oct 18, 2023
b35cb33
undo package json changes
pragatimodi Oct 18, 2023
8bd4d39
Merge branch 'master' into passkeys
pragatimodi Oct 18, 2023
5c16959
passkey config admin changes
pragatimodi Oct 4, 2023
218e7d3
fixed unit test errors
dependabot[bot] Oct 4, 2023
0977e7a
lint fixes + integration
dependabot[bot] Oct 12, 2023
dfe7f4a
remove integration tests
pragatimodi Oct 18, 2023
1bb1526
undo package json changes
pragatimodi Oct 18, 2023
abfb295
adding comments
pragatimodi Oct 18, 2023
045d959
Merge branch 'passkeys' of https://github.com/firebase/firebase-admin…
pragatimodi Oct 18, 2023
fff81ce
undo package json changes
pragatimodi Oct 18, 2023
9d69dd8
undo package json changes
pragatimodi Oct 18, 2023
7127be9
Merge branch 'passkeys' of https://github.com/firebase/firebase-admin…
pragatimodi Oct 18, 2023
1ab9273
undo duplicate npm changes
pragatimodi Oct 18, 2023
c294ff4
Apply suggestions from code review
pragatimodi Oct 19, 2023
6492438
update toJSON for string values
pragatimodi Apr 2, 2024
f9d35c3
Merge branch 'master' into passkeys
pragatimodi Apr 3, 2024
041bf17
user record changes for getAccountInfo() (#2341)
pragatimodi Apr 3, 2024
0389dc1
correct endpoint
pragatimodi Apr 3, 2024
5364938
fix tenant endpoint handling
pragatimodi Apr 3, 2024
8d3384b
fix lint
pragatimodi Apr 3, 2024
cec0cbe
add api:extractor changes
pragatimodi Apr 3, 2024
2c70e61
remove uncommented code
pragatimodi Jun 26, 2024
64203c3
Merge branch 'master' into passkeys
pragatimodi Jun 27, 2024
bf58ff0
Merge branch 'master' into passkeys
pragatimodi Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Kevin Cheung <[email protected]>
  • Loading branch information
pragatimodi and kevinthecheung authored Oct 19, 2023
commit c294ff4a5f7ce5124f737c80aa7d74366465d538
4 changes: 2 additions & 2 deletions src/auth/passkey-config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from './passkey-config';

/**
* Manages Passkey Configuration for a Firebase app.
* Manages Passkey configuration for a Firebase app.
*/
export class PasskeyConfigManager {
private readonly authRequestHandler: AuthRequestHandler;
Expand All @@ -43,7 +43,7 @@ export class PasskeyConfigManager {
}

/**
* Retrieves the Passkey Configuration.
* Retrieves the Passkey configuration.
*
* @param tenantId - (optional) The tenant ID if querying passkeys on a specific tenant.
* @returns A promise fulfilled with the passkey configuration.
Expand Down
18 changes: 9 additions & 9 deletions src/auth/passkey-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import { AuthClientErrorCode, FirebaseAuthError } from '../utils/error';
import { deepCopy } from '../utils/deep-copy';

/**
* Interface representing the properties to update in the provided passkey config.
* Interface representing the properties to update in a passkey config.
*/
export interface PasskeyConfigRequest {
/**
* An array of website or app origins associated with the customer's sites or apps.
* Only challenges signed from these origins will be allowed for signing in with passkeys.
* An array of website or app origins. Only challenges signed
* from these origins will be allowed for signing in with passkeys.
*/
expectedOrigins?: string[];
}
Expand Down Expand Up @@ -59,7 +59,7 @@ export class PasskeyConfig {
*/
public readonly rpId?: string;
/**
* The website or app origins associated with the customer's sites or apps.
* The allowed website or app origins.
* Only challenges signed from these origins will be allowed for signing in with passkeys.
*/
public readonly expectedOrigins?: string[];
Expand All @@ -78,7 +78,7 @@ export class PasskeyConfig {
if (isCreateRequest && !validator.isNonEmptyString(rpId)) {
throw new FirebaseAuthError(
AuthClientErrorCode.INVALID_ARGUMENT,
"'rpId' must be a valid non-empty string.",
"'rpId' must be a non-empty string.",
);
}
// Validation for updating an existing PasskeyConfig.
Expand All @@ -91,7 +91,7 @@ export class PasskeyConfig {
if (!validator.isNonNullObject(passkeyConfigRequest)) {
throw new FirebaseAuthError(
AuthClientErrorCode.INVALID_ARGUMENT,
"'passkeyConfigRequest' must be a valid non-empty object.",
"'passkeyConfigRequest' must not be null.",
);
}
const validKeys = {
Expand All @@ -109,21 +109,21 @@ export class PasskeyConfig {
if (!validator.isNonEmptyArray(passkeyConfigRequest.expectedOrigins)) {
throw new FirebaseAuthError(
AuthClientErrorCode.INVALID_ARGUMENT,
"'passkeyConfigRequest.expectedOrigins' must be a valid non-empty array of strings.",
"'passkeyConfigRequest.expectedOrigins' must contain at least one item.",
);
}
for (const origin of passkeyConfigRequest.expectedOrigins) {
if (!validator.isNonEmptyString(origin)) {
throw new FirebaseAuthError(
AuthClientErrorCode.INVALID_ARGUMENT,
"'passkeyConfigRequest.expectedOrigins' must be a valid non-empty array of strings.",
"'passkeyConfigRequest.expectedOrigins' cannot contain empty strings.",
);
}
}
}

/**
* Build the corresponding server request for a Passkey Config object.
* Build a server request for a Passkey Config object.
* @param isCreateRequest - A boolean stating if it's a create request.
* @param passkeyConfigRequest - Passkey config to be updated.
* @param rpId - (optional) Relying party ID for the request if it's a create request.
Expand Down