diff options
author | Matthew Miller <matthew@millerti.me> | 2022-04-11 22:51:37 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-05-15 21:49:33 -0700 |
commit | 6021105753741a33d40a4fa3e8948e893d6501db (patch) | |
tree | 60ae9b96ee4127c632210998df290f860d82a430 | |
parent | f26bb73d3d620b68b902bb5f6110cf025fcb4571 (diff) |
Parse bits 3 and 4 for backup info
-rw-r--r-- | packages/server/src/helpers/parseAuthenticatorData.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/server/src/helpers/parseAuthenticatorData.ts b/packages/server/src/helpers/parseAuthenticatorData.ts index a816d15..d4b0646 100644 --- a/packages/server/src/helpers/parseAuthenticatorData.ts +++ b/packages/server/src/helpers/parseAuthenticatorData.ts @@ -23,6 +23,8 @@ export default function parseAuthenticatorData(authData: Buffer): ParsedAuthenti const flags = { up: !!(flagsInt & 1 << 0), // User Presence uv: !!(flagsInt & 1 << 2), // User Verified + be: !!(flagsInt & 1 << 3), // Backup Eligible + bs: !!(flagsInt & 1 << 4), // Backup State at: !!(flagsInt & 1 << 6), // Attested Credential Data Present ed: !!(flagsInt & 1 << 7), // Extension Data Present flagsInt, @@ -82,6 +84,8 @@ export type ParsedAuthenticatorData = { flags: { up: boolean; uv: boolean; + be: boolean; + bs: boolean; at: boolean; ed: boolean; flagsInt: number; |