From 754f177da9abecb61b5ccaff5efb203d92aeb581 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 4 Jul 2024 23:55:28 -0400 Subject: push latest development --- lib/vnlib.browser/src/mfa/login.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/vnlib.browser/src/mfa/login.ts b/lib/vnlib.browser/src/mfa/login.ts index 57465ef..ed61c1c 100644 --- a/lib/vnlib.browser/src/mfa/login.ts +++ b/lib/vnlib.browser/src/mfa/login.ts @@ -18,7 +18,7 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import { decodeJwt, type JWTPayload } from "jose"; -import { forEach, isNil } from 'lodash-es'; +import { first, forEach, isNil } from 'lodash-es'; import { get } from "@vueuse/core"; import { debugLog } from "../util" import { useUser, type ExtendedLoginResponse } from "../user"; @@ -40,9 +40,9 @@ export interface IMfaSubmission { export interface IMfaMessage extends JWTPayload { /** - * The type of mfa upgrade + * The supported mfa methods for the user */ - readonly type: MfaMethod; + readonly capabilities: MfaMethod[]; /** * The time in seconds that the mfa upgrade is valid for */ @@ -143,7 +143,7 @@ const getMfaProcessor = (user: IUserInternal, axios:Ref) =>{ debugLog(mfa) //Select the mfa handler - const handler = handlerMap.get(mfa.type); + const handler = handlerMap.get(first(mfa.capabilities)!); //If no handler is found, throw an error if(!handler){ -- cgit