diff options
author | vnugent <public@vaughnnugent.com> | 2024-07-04 23:55:28 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-07-04 23:55:28 -0400 |
commit | 754f177da9abecb61b5ccaff5efb203d92aeb581 (patch) | |
tree | 1617d6267383e9a434712836dec780f30be2d0ba /lib | |
parent | f977d561f2ef6353d8f54fbf2466c87cf6456e31 (diff) |
push latest development
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vnlib.browser/src/mfa/login.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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<Axios>) =>{ 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){ |