diff --git a/src/function/sync/apply-actions/dispatch-parent-action/addu2fkey.ts b/src/function/sync/apply-actions/dispatch-parent-action/addu2fkey.ts index 5aa752a..0d0a877 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/addu2fkey.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/addu2fkey.ts @@ -18,20 +18,13 @@ import { AddParentU2fKeyAction } from '../../../../action' import { getU2fKeyId } from '../../../../database/u2fkey' import { Cache } from '../cache' -import { ApplyActionUnacceptableAuthMethodException } from '../exception/auth' import { LimitReachedException } from '../exception/limit' -import { AuthenticationMethod } from '../types' -export async function dispatchAddU2f ({ action, cache, parentUserId, authentication }: { +export async function dispatchAddU2f ({ action, cache, parentUserId }: { action: AddParentU2fKeyAction cache: Cache parentUserId: string - authentication: AuthenticationMethod }) { - if (authentication === 'u2f') { - throw new ApplyActionUnacceptableAuthMethodException() - } - const counter = await cache.database.u2fKey.count({ where: { familyId: cache.familyId diff --git a/src/function/sync/apply-actions/dispatch-parent-action/index.ts b/src/function/sync/apply-actions/dispatch-parent-action/index.ts index b22f517..ce8da95 100644 --- a/src/function/sync/apply-actions/dispatch-parent-action/index.ts +++ b/src/function/sync/apply-actions/dispatch-parent-action/index.ts @@ -158,7 +158,7 @@ export const dispatchParentAction = async ({ if (action instanceof AddCategoryNetworkIdAction) { return dispatchAddCategoryNetworkId({ action, cache }) } else if (action instanceof AddParentU2fKeyAction) { - return dispatchAddU2f({ action, cache, parentUserId, authentication }) + return dispatchAddU2f({ action, cache, parentUserId }) } else if (action instanceof AddUserAction) { return dispatchAddUser({ action, cache }) } else if (action instanceof RemoveCategoryAppsAction) {