+ await db.authenticationUpsert(dbCtx, identifier, credential, otpKey);
+ const authInfo = await db.authenticationGet(dbCtx, identifier);
+ assert.strictEqual(authInfo.credential, credential);
+ assert.strictEqual(authInfo.otpKey, otpKey);
+ });
+ });
+ step('update auth credential', async function () {
+ await db.context(async (dbCtx) => {
+ credential = '$plain$anotherNewPassword';
+ await db.authenticationUpdateCredential(dbCtx, identifier, credential);