Skip to content

Commit 6cb6a33

Browse files
committed
chore(*): merged latest
2 parents b92d23a + 089fe1c commit 6cb6a33

18 files changed

+78
-33
lines changed

examples/react/src/routes.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,73 +15,79 @@ import MultiFactorAuthEnrollmentScreenPage from "./screens/mfa-enrollment-screen
1515
export const routes = [
1616
{
1717
name: "Sign In Screen",
18-
description: "A simple sign in screen with email and password",
18+
description: "A sign in screen with email and password.",
1919
path: "/screens/sign-in-auth-screen",
2020
component: SignInAuthScreenPage,
2121
},
2222
{
2323
name: "Sign In Screen (with handlers)",
24-
description: "A simple sign in screen with email and password, with forgot password and register handlers",
24+
description: "A sign in screen with email and password, with forgot password and register handlers.",
2525
path: "/screens/sign-in-auth-screen-w-handlers",
2626
component: SignInAuthScreenWithHandlersPage,
2727
},
2828
{
2929
name: "Sign In Screen (with OAuth)",
30-
description: "A simple sign in screen with email and password, with oAuth buttons",
30+
description: "A sign in screen with email and password, with oAuth buttons.",
3131
path: "/screens/sign-in-auth-screen-w-oauth",
3232
component: SignInAuthScreenWithOAuthPage,
3333
},
3434
{
3535
name: "Sign Up Screen",
36-
description: "A simple sign up screen with email and password",
36+
description: "A sign up screen with email and password.",
3737
path: "/screens/sign-up-auth-screen",
3838
component: SignUpAuthScreenPage,
3939
},
4040
{
4141
name: "Sign Up Screen (with handlers)",
42-
description: "A simple sign up screen with email and password, sign in handlers",
42+
description: "A sign up screen with email and password, sign in handlers.",
4343
path: "/screens/sign-up-auth-screen-w-handlers",
4444
component: SignUpAuthScreenWithHandlersPage,
4545
},
4646
{
4747
name: "Sign Up Screen (with OAuth)",
48-
description: "A simple sign in screen with email and password, with oAuth buttons",
48+
description: "A sign in screen with email and password, with oAuth buttons.",
4949
path: "/screens/sign-up-auth-screen-w-oauth",
5050
component: SignUpAuthScreenWithOAuthPage,
5151
},
5252
{
5353
name: "Email Link Auth Screen",
54-
description: "A screen allowing a user to send an email link for sign in",
54+
description: "A screen allowing a user to send an email link for sign in.",
5555
path: "/screens/email-link-auth-screen",
5656
component: EmailLinkAuthScreenPage,
5757
},
5858
{
5959
name: "Email Link Auth Screen (with OAuth)",
60-
description: "A screen allowing a user to send an email link for sign in, with oAuth buttons",
60+
description: "A screen allowing a user to send an email link for sign in, with oAuth buttons.",
6161
path: "/screens/email-link-auth-screen-w-oauth",
6262
component: EmailLinkAuthScreenWithOAuthPage,
6363
},
6464
{
6565
name: "Forgot Password Screen",
66-
description: "A screen allowing a user to reset their password",
66+
description: "A screen allowing a user to reset their password.",
6767
path: "/screens/forgot-password-auth-screen",
6868
component: ForgotPasswordAuthScreenPage,
6969
},
70+
{
71+
name: "Forgot Password Screen (with handlers)",
72+
description: "A screen allowing a user to reset their password, with forgot password and register handlers.",
73+
path: "/screens/forgot-password-auth-screen-w-handlers",
74+
component: ForgotPasswordAuthScreenPage,
75+
},
7076
{
7177
name: "OAuth Screen",
72-
description: "A screen which allows a user to sign in with OAuth only",
78+
description: "A screen which allows a user to sign in with OAuth only.",
7379
path: "/screens/oauth-screen",
7480
component: OAuthScreenPage,
7581
},
7682
{
7783
name: "Phone Auth Screen",
78-
description: "A screen allowing a user to sign in with a phone number",
84+
description: "A screen allowing a user to sign in with a phone number.",
7985
path: "/screens/phone-auth-screen",
8086
component: PhoneAuthScreenPage,
8187
},
8288
{
8389
name: "Phone Auth Screen (with OAuth)",
84-
description: "A screen allowing a user to sign in with a phone number, with oAuth buttons",
90+
description: "A screen allowing a user to sign in with a phone number, with oAuth buttons.",
8591
path: "/screens/phone-auth-screen-w-oauth",
8692
component: PhoneAuthScreenWithOAuthPage,
8793
},
@@ -90,7 +96,7 @@ export const routes = [
9096
export const hiddenRoutes = [
9197
{
9298
name: "MFA Enrollment Screen",
93-
description: "A screen allowing a user to enroll in multi-factor authentication",
99+
description: "A screen allowing a user to enroll in multi-factor authentication.",
94100
path: "/screens/mfa-enrollment-screen",
95101
component: MultiFactorAuthEnrollmentScreenPage,
96102
},

examples/react/src/screens/forgot-password-auth-screen-w-handlers.tsx

Whitespace-only changes.

packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ describe("<fui-totp-multi-factor-enrollment-form />", () => {
5555
verificationCode: "Verification Code",
5656
verifyCode: "Verify Code",
5757
},
58+
prompts: {
59+
mfaTotpQrCodePrompt: "Scan this QR code with your authenticator app",
60+
},
5861
errors: {
5962
unknownError: "An unknown error occurred",
6063
},
@@ -148,7 +151,7 @@ describe("<fui-totp-multi-factor-enrollment-form />", () => {
148151
fixture.detectChanges();
149152

150153
expect(screen.getByAltText("TOTP QR Code")).toBeInTheDocument();
151-
expect(screen.getByText("TODO: Scan this QR code with your authenticator app")).toBeInTheDocument();
154+
expect(screen.getByText("Scan this QR code with your authenticator app")).toBeInTheDocument();
152155
expect(screen.getByLabelText("Verification Code")).toBeInTheDocument();
153156
expect(screen.getByRole("button", { name: "Verify Code" })).toBeInTheDocument();
154157
});

packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class TotpMultiFactorSecretGenerationFormComponent {
134134
template: `
135135
<div class="fui-qr-code-container">
136136
<img [src]="qrCodeDataUrl()" alt="TOTP QR Code" />
137-
<p>TODO: Scan this QR code with your authenticator app</p>
137+
<p>{{ mfaTotpQrCodePrompt() }}</p>
138138
</div>
139139
<form (submit)="handleSubmit($event)" class="fui-form">
140140
<fieldset>
@@ -165,6 +165,7 @@ export class TotpMultiFactorVerificationFormComponent {
165165

166166
verificationCodeLabel = injectTranslation("labels", "verificationCode");
167167
verifyCodeLabel = injectTranslation("labels", "verifyCode");
168+
mfaTotpQrCodePrompt = injectTranslation("prompts", "mfaTotpQrCodePrompt");
168169
unknownErrorLabel = injectTranslation("errors", "unknownError");
169170

170171
form = injectForm({

packages/angular/src/lib/auth/forms/multi-factor-auth-assertion-form.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ describe("<fui-multi-factor-auth-assertion-form>", () => {
3030
mfaSmsVerification: "SMS Verification",
3131
mfaTotpVerification: "TOTP Verification",
3232
},
33+
prompts: {
34+
mfaAssertionFactorPrompt: "Please choose a multi-factor authentication method",
35+
},
3336
};
3437
return () => mockTranslations[category]?.[key] || `${category}.${key}`;
3538
});
@@ -68,6 +71,7 @@ describe("<fui-multi-factor-auth-assertion-form>", () => {
6871
imports: [MultiFactorAuthAssertionFormComponent],
6972
});
7073

74+
expect(screen.getByText("Please choose a multi-factor authentication method")).toBeInTheDocument();
7175
expect(screen.getByRole("button", { name: "SMS Verification" })).toBeInTheDocument();
7276
expect(screen.getByRole("button", { name: "TOTP Verification" })).toBeInTheDocument();
7377

packages/angular/src/lib/auth/forms/multi-factor-auth-assertion-form.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { ButtonComponent } from "../../components/button";
4040
<fui-totp-multi-factor-assertion-form [hint]="selectedHint()!" (onSuccess)="onSuccess.emit($event)" />
4141
}
4242
} @else {
43-
<p>TODO: Select a multi-factor authentication method</p>
43+
<p>{{ mfaAssertionFactorPrompt() }}</p>
4444
@for (hint of resolver().hints; track hint.factorId) {
4545
@if (hint.factorId === totpFactorId()) {
4646
<button fui-button (click)="selectHint(hint)">
@@ -78,6 +78,7 @@ export class MultiFactorAuthAssertionFormComponent {
7878

7979
smsVerificationLabel = injectTranslation("labels", "mfaSmsVerification");
8080
totpVerificationLabel = injectTranslation("labels", "mfaTotpVerification");
81+
mfaAssertionFactorPrompt = injectTranslation("prompts", "mfaAssertionFactorPrompt");
8182

8283
selectHint(hint: MultiFactorInfo) {
8384
this.selectedHint.set(hint);

packages/react/src/auth/forms/forgot-password-auth-form.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ describe("<ForgotPasswordAuthForm />", () => {
187187
</FirebaseUIProvider>
188188
);
189189

190-
const backToSignInButton = screen.getByRole("button", { name: "backToSignIn" });
190+
const backToSignInButton = screen.getByRole("button", { name: "backToSignIn" });
191191
expect(backToSignInButton).toBeInTheDocument();
192-
expect(backToSignInButton).toHaveTextContent("backToSignIn");
192+
expect(backToSignInButton).toHaveTextContent("backToSignIn");
193193

194194
// Make sure it's a button so it doesn't submit the form
195195
expect(backToSignInButton).toHaveAttribute("type", "button");

packages/react/src/auth/forms/forgot-password-auth-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function ForgotPasswordAuthForm({ onBackToSignInClick, onPasswordSent }:
102102
<form.ErrorMessage />
103103
</fieldset>
104104
{onBackToSignInClick ? (
105-
<form.Action onClick={onBackToSignInClick}>{getTranslation(ui, "labels", "backToSignIn")}</form.Action>
105+
<form.Action onClick={onBackToSignInClick}>&larr; {getTranslation(ui, "labels", "backToSignIn")}</form.Action>
106106
) : null}
107107
</form.AppForm>
108108
</form>

packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ describe("<MultiFactorEnrollmentVerifyTotpForm />", () => {
169169
verificationCode: "verificationCode",
170170
verifyCode: "verifyCode",
171171
},
172+
prompts: {
173+
mfaTotpQrCodePrompt: "Scan this QR code with your authenticator app",
174+
},
172175
}),
173176
});
174177

@@ -192,6 +195,7 @@ describe("<MultiFactorEnrollmentVerifyTotpForm />", () => {
192195

193196
expect(container.querySelector(".fui-qr-code-container")).toBeInTheDocument();
194197
expect(container.querySelector("img[alt='TOTP QR Code']")).toBeInTheDocument();
198+
expect(screen.getByText("Scan this QR code with your authenticator app")).toBeInTheDocument();
195199
});
196200
});
197201

packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export function MultiFactorEnrollmentVerifyTotpForm(props: MultiFactorEnrollment
155155
>
156156
<div className="fui-qr-code-container">
157157
<img src={qrCodeDataUrl} alt="TOTP QR Code" />
158-
<p>TODO: Scan this QR code with your authenticator app</p>
158+
<p>{getTranslation(ui, "prompts", "mfaTotpQrCodePrompt")}</p>
159159
</div>
160160
<form.AppForm>
161161
<fieldset>

0 commit comments

Comments
 (0)