diff options
author | Matthew Miller <matthew@millerti.me> | 2024-02-22 20:18:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 20:18:14 -0800 |
commit | b11b4a2aec5fd8a202019cb117bc0d3d1f7f260f (patch) | |
tree | 7d2565b376f2ad85647016581a11ed3aa207a7f7 /packages/server/src/helpers/decodeClientDataJSON.ts | |
parent | d345287878b6f32ae59652591feb3b9fc363eb70 (diff) | |
parent | 25bf20940bad5b65b01e81163628132ad17c2d21 (diff) |
Merge pull request #527 from MasterKale/fix/525-tweak-client-data-json-parse-arg-type
fix/525-tweak-client-data-json-parse-arg-type
Diffstat (limited to 'packages/server/src/helpers/decodeClientDataJSON.ts')
-rw-r--r-- | packages/server/src/helpers/decodeClientDataJSON.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/server/src/helpers/decodeClientDataJSON.ts b/packages/server/src/helpers/decodeClientDataJSON.ts index 645a09f..aeb4251 100644 --- a/packages/server/src/helpers/decodeClientDataJSON.ts +++ b/packages/server/src/helpers/decodeClientDataJSON.ts @@ -1,9 +1,10 @@ import { isoBase64URL } from './iso/index.ts'; +import type { Base64URLString } from '../deps.ts'; /** * Decode an authenticator's base64url-encoded clientDataJSON to JSON */ -export function decodeClientDataJSON(data: string): ClientDataJSON { +export function decodeClientDataJSON(data: Base64URLString): ClientDataJSON { const toString = isoBase64URL.toString(data); const clientData: ClientDataJSON = JSON.parse(toString); |