From 9639e06dc5f2f019eeb4a55001306244ecd06733 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 23 Feb 2024 11:53:30 +0530 Subject: [PATCH] Change SSO mapper to add secretEncoding field --- lib/Db/SSOMapper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Db/SSOMapper.php b/lib/Db/SSOMapper.php index 3c04b982..89f4af88 100644 --- a/lib/Db/SSOMapper.php +++ b/lib/Db/SSOMapper.php @@ -58,7 +58,7 @@ class SSOMapper { $qb->delete(self::CREDENTIAL_TABLE) ->where('USER_ID = :username') ->andWhere('TYPE = "otp"') - ->andWhere('CREDENTIAL_DATA LIKE "%\"subType\":\"nextcloud_totp\"%" OR CREDENTIAL_DATA LIKE "%\"subType\":\"totp\"%"') + ->andWhere('CREDENTIAL_DATA LIKE "%\"subType\":\"totp\"%"') ->setParameter('username', $userId) ->execute(); } @@ -112,10 +112,11 @@ class SSOMapper { 'value' => $secret ]), 'CREDENTIAL_DATA' => json_encode([ - 'subType' => 'nextcloud_totp', + 'subType' => 'totp', 'period' => 30, 'digits' => 6, 'algorithm' => 'HmacSHA1', + 'secretEncoding' => 'BASE32', ]), ]; -- GitLab