summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/decodeClientDataJSON.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2024-02-22 19:58:44 -0800
committerMatthew Miller <matthew@millerti.me>2024-02-22 19:58:44 -0800
commit25bf20940bad5b65b01e81163628132ad17c2d21 (patch)
tree7d2565b376f2ad85647016581a11ed3aa207a7f7 /packages/server/src/helpers/decodeClientDataJSON.ts
parentd345287878b6f32ae59652591feb3b9fc363eb70 (diff)
Refine typing on data arg
Diffstat (limited to 'packages/server/src/helpers/decodeClientDataJSON.ts')
-rw-r--r--packages/server/src/helpers/decodeClientDataJSON.ts3
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);