Skip to content

Commit 667126e

Browse files
vpomerleaudschom
authored andcommitted
fix(auth): SMS message did not include body text
Because: * Bosy text should be added to SMS in addition to code This commit: * Fix the formatted message retrieval Closes #FXA-11151
1 parent 150bd0d commit 667126e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/fxa-auth-server/lib/routes/recovery-phone.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class RecoveryPhoneHandler {
5757
this.localizer = new Localizer(new NodeRendererBindings());
5858
}
5959

60-
getLocalizedStrings = async (
60+
getLocalizedMessage = async (
6161
request: AuthRequest,
6262
code: string,
6363
type: 'setup' | 'signin'
@@ -82,7 +82,7 @@ class RecoveryPhoneHandler {
8282
},
8383
]
8484
);
85-
return localizedStrings;
85+
return localizedStrings[id];
8686
};
8787

8888
async sendCode(request: AuthRequest) {
@@ -96,11 +96,11 @@ class RecoveryPhoneHandler {
9696
await this.customs.check(request, email, 'recoveryPhoneSendCode');
9797

9898
const getFormattedMessage = async (code: string) => {
99-
const localizedMessage = await this.getLocalizedStrings(
99+
const localizedMessage = await this.getLocalizedMessage(
100100
request,
101101
code,
102102
'signin'
103-
)[0];
103+
);
104104
return localizedMessage;
105105
};
106106

@@ -155,11 +155,11 @@ class RecoveryPhoneHandler {
155155
await this.customs.checkAuthenticated(request, uid, 'recoveryPhoneCreate');
156156

157157
const getFormattedMessage = async (code: string) => {
158-
const localizedMessage = await this.getLocalizedStrings(
158+
const localizedMessage = await this.getLocalizedMessage(
159159
request,
160160
code,
161161
'setup'
162-
)[0];
162+
);
163163
return localizedMessage;
164164
};
165165

@@ -456,7 +456,7 @@ class RecoveryPhoneHandler {
456456
} catch (error) {
457457
throw AppError.backendServiceFailure(
458458
'RecoveryPhoneService',
459-
'destroy',
459+
'available',
460460
{ uid },
461461
error
462462
);

0 commit comments

Comments
 (0)