diff --git a/packages/core-users/src/module/configureUsersWebAuthnModule.ts b/packages/core-users/src/module/configureUsersWebAuthnModule.ts index 758aa0423..5409c3742 100644 --- a/packages/core-users/src/module/configureUsersWebAuthnModule.ts +++ b/packages/core-users/src/module/configureUsersWebAuthnModule.ts @@ -19,7 +19,7 @@ export interface UsersWebAuthnModule { extensionOptions?: any, ) => Promise; verifyCredentialRequest: (userPublicKeys: any[], username: string, credentials: any) => Promise; - deleteUserCredentials: (username: string) => Promise; + deleteUserWebAuthnCredentials: (username: string) => Promise; } const logger = createLogger('unchained:core-users'); @@ -232,7 +232,7 @@ export const configureUsersWebAuthnModule = async ({ const loginResult = await f2l.assertionResult(assertionResponse, assertionExpectations); return { userHandle: loginResult?.authnrData?.get('userHandle') }; }, - deleteUserCredentials: async (username: string) => { + deleteUserWebAuthnCredentials: async (username: string) => { const { deletedCount } = await WebAuthnCredentialsCreationRequests.deleteMany({ username, }); diff --git a/packages/core/src/services/deleteUser.ts b/packages/core/src/services/deleteUser.ts index 07de4eb5f..6b73eae44 100644 --- a/packages/core/src/services/deleteUser.ts +++ b/packages/core/src/services/deleteUser.ts @@ -9,7 +9,7 @@ export async function deleteUserService(this: Modules, { userId }: { userId: str await this.quotations.deleteRequestedUserQuotations(userId); await this.enrollments.deleteInactiveUserEnrollments(userId); await this.payment.paymentCredentials.deleteUserPaymentCredentials(userId); - await this.users.webAuthn.deleteUserCredentials(user.username); + await this.users.webAuthn.deleteUserWebAuthnCredentials(user.username); const carts = await this.orders.findOrders({ userId, status: null });