From 0be7c0711a9447e952dcaf28e506c51a0f04b79f Mon Sep 17 00:00:00 2001 From: Corentin Mors Date: Fri, 22 Nov 2024 10:14:52 +0100 Subject: [PATCH] Fix wrong default alg for totp Fix #299 --- src/modules/crypto/otpauth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/crypto/otpauth.ts b/src/modules/crypto/otpauth.ts index 19ba0ed..c34d3ed 100644 --- a/src/modules/crypto/otpauth.ts +++ b/src/modules/crypto/otpauth.ts @@ -39,7 +39,7 @@ const parseOtpauth = (uri: string): Otpauth => { type: url.hostname, issuer: searchParams.get('issuer') ?? '', secret: searchParams.get('secret') ?? '', - algorithm: matchAlgorithm(searchParams.get('algorithm') ?? 'sha1'), + algorithm: matchAlgorithm(searchParams.get('algorithm') ?? 'SHA1'), digits: Number(searchParams.get('digits') ?? 0), period: Number(searchParams.get('period') ?? 0), counter: Number(searchParams.get('counter') ?? 0),