diff --git a/.auri/$zvzn8ngu.md b/.auri/$zvzn8ngu.md new file mode 100644 index 000000000..912ea510c --- /dev/null +++ b/.auri/$zvzn8ngu.md @@ -0,0 +1,6 @@ +--- +package: "lucia" # package name +type: "minor" # "major", "minor", "patch" +--- + +Fixed `updateKeyPassword()` to return a `Promise` diff --git a/packages/lucia/src/auth/index.ts b/packages/lucia/src/auth/index.ts index 42bd47e7c..29d59e1fb 100644 --- a/packages/lucia/src/auth/index.ts +++ b/packages/lucia/src/auth/index.ts @@ -642,14 +642,14 @@ export class Auth<_Configuration extends Configuration = any> { providerId: string, providerUserId: string, password: string | null - ): Promise => { + ): Promise => { const keyId = createKeyId(providerId, providerUserId); const hashedPassword = password === null ? null : await this.passwordHash.generate(password); await this.adapter.updateKey(keyId, { hashed_password: hashedPassword }); - await this.getKey(providerId, providerUserId); + return await this.getKey(providerId, providerUserId); }; } type MaybePromise = T | Promise;