@@ -18,8 +18,8 @@ import { useDisplayConfig } from '~/hooks/use-display-config';
18
18
import { useEnabledConnections } from '~/hooks/use-enabled-connections' ;
19
19
import { useEnvironment } from '~/hooks/use-environment' ;
20
20
import { useLocalizations } from '~/hooks/use-localizations' ;
21
- import { useSupportEmail } from '~/hooks/use-support-email' ;
22
21
import { useResetPasswordFactor } from '~/hooks/use-reset-password-factor' ;
22
+ import { useSupportEmail } from '~/hooks/use-support-email' ;
23
23
import { Alert } from '~/primitives/alert' ;
24
24
import { Button } from '~/primitives/button' ;
25
25
import * as Card from '~/primitives/card' ;
@@ -451,6 +451,93 @@ export function SignInComponentLoaded() {
451
451
</ Card . Body >
452
452
</ SignIn . Strategy >
453
453
454
+ < SignIn . Strategy name = 'phone_code' >
455
+ < Card . Header >
456
+ { logoImageUrl ? (
457
+ < Card . Logo
458
+ href = { homeUrl }
459
+ src = { logoImageUrl }
460
+ alt = { applicationName }
461
+ />
462
+ ) : null }
463
+ < Card . Title > { t ( 'signIn.phoneCode.title' ) } </ Card . Title >
464
+ < Card . Description > { t ( 'signIn.phoneCode.subtitle' , { applicationName } ) } </ Card . Description >
465
+ < Card . Description >
466
+ < span className = 'flex items-center justify-center gap-2' >
467
+ < SignIn . SafeIdentifier
468
+ // TODO: uncomment once https://github.com/clerk/javascript/pull/3749 is merged
469
+ // transform={formatSafeIdentifier}
470
+ />
471
+ < SignIn . Action
472
+ navigate = 'start'
473
+ asChild
474
+ >
475
+ < button
476
+ type = 'button'
477
+ className = 'text-accent-9 focus-visible:ring-default size-4 rounded-sm outline-none focus-visible:ring-2'
478
+ aria-label = 'Start again'
479
+ >
480
+ < Icon . PencilUnderlined />
481
+ </ button >
482
+ </ SignIn . Action >
483
+ </ span >
484
+ </ Card . Description >
485
+ </ Card . Header >
486
+
487
+ < Card . Body >
488
+ < Common . GlobalError >
489
+ { ( { message } ) => {
490
+ return < Alert > { message } </ Alert > ;
491
+ } }
492
+ </ Common . GlobalError >
493
+ < OTPField
494
+ disabled = { isGlobalLoading }
495
+ resend = {
496
+ < SignIn . Action
497
+ asChild
498
+ resend
499
+ // eslint-disable-next-line react/no-unstable-nested-components
500
+ fallback = { ( { resendableAfter } ) => (
501
+ < p className = 'text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium' >
502
+ { t ( 'signIn.phoneCode.resendButton' ) } (
503
+ < span className = 'tabular-nums' > { resendableAfter } </ span > )
504
+ </ p >
505
+ ) }
506
+ >
507
+ < LinkButton type = 'button' > { t ( 'signIn.phoneCode.resendButton' ) } </ LinkButton >
508
+ </ SignIn . Action >
509
+ }
510
+ />
511
+ < Common . Loading scope = 'step:verifications' >
512
+ { isSubmitting => {
513
+ return (
514
+ < div className = 'flex flex-col gap-4' >
515
+ < SignIn . Action
516
+ submit
517
+ asChild
518
+ >
519
+ < Button
520
+ busy = { isSubmitting }
521
+ disabled = { isGlobalLoading }
522
+ icon = { < Icon . CaretRight /> }
523
+ >
524
+ { t ( 'formButtonPrimary' ) }
525
+ </ Button >
526
+ </ SignIn . Action >
527
+
528
+ < SignIn . Action
529
+ asChild
530
+ navigate = 'choose-strategy'
531
+ >
532
+ < LinkButton type = 'button' > { t ( 'footerActionLink__useAnotherMethod' ) } </ LinkButton >
533
+ </ SignIn . Action >
534
+ </ div >
535
+ ) ;
536
+ } }
537
+ </ Common . Loading >
538
+ </ Card . Body >
539
+ </ SignIn . Strategy >
540
+
454
541
< SignIn . Strategy name = 'email_link' >
455
542
< Card . Header >
456
543
{ logoImageUrl ? (
0 commit comments