diff options
author | Matthew Miller <matthew@millerti.me> | 2024-02-22 19:58:44 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2024-02-22 19:58:44 -0800 |
commit | 25bf20940bad5b65b01e81163628132ad17c2d21 (patch) | |
tree | 7d2565b376f2ad85647016581a11ed3aa207a7f7 /packages/server/src/helpers/decodeClientDataJSON.ts | |
parent | d345287878b6f32ae59652591feb3b9fc363eb70 (diff) |
Refine typing on data arg
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); |