Skip to content

Commit 96977ca

Browse files
committed
fixes passwordless email resending bug
1 parent ca39869 commit 96977ca

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- Fixes a few typos
3030
- Changes `getEmailForUserIdForEmailVerification` function inside thirdpartypasswordless to take into account passwordless emails and return an empty string in case a passwordless email doesn't exist. This helps situations where the dev wants to customise the email verification functions in the thirdpartypasswordless recipe.
3131

32+
### Fixes
33+
34+
- Fixes email undefined error when resending the passwordless login email.
35+
3236
## [9.3.0] - 2022-06-17
3337

3438
### Added

lib/build/recipe/passwordless/api/implementation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ function getAPIImplementation() {
266266
logger_1.logDebugMessage(`Sending passwordless login email to ${input.email}`);
267267
yield input.options.emailDelivery.ingredientInterfaceImpl.sendEmail({
268268
type: "PASSWORDLESS_LOGIN",
269-
email: input.email,
269+
email: deviceInfo.email,
270270
codeLifetime: response.codeLifetime,
271271
preAuthSessionId: response.preAuthSessionId,
272272
urlWithLinkCode: magicLink,

lib/ts/recipe/passwordless/api/implementation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default function getAPIImplementation(): APIInterface {
234234
logDebugMessage(`Sending passwordless login email to ${(input as any).email}`);
235235
await input.options.emailDelivery.ingredientInterfaceImpl.sendEmail({
236236
type: "PASSWORDLESS_LOGIN",
237-
email: (input as any).email!,
237+
email: deviceInfo.email!,
238238
codeLifetime: response.codeLifetime,
239239
preAuthSessionId: response.preAuthSessionId,
240240
urlWithLinkCode: magicLink,

0 commit comments

Comments
 (0)