Conversation
ac00840 to
11bd7a8
Compare
Because: - The passwordless otp signup/signin needs its own pages that vary slightly from existing signin flows. This commit: - Adds signin and signup pages, containers and components Closes #FXA-13017
11bd7a8 to
9f206b5
Compare
| getClientId(): string | undefined { | ||
| return this.opts?.clientId || undefined; | ||
| } |
There was a problem hiding this comment.
Reason for this change is so that a clientId can be sent to the passwordless routes in auth-server, which check if passwordless OTP is enabled for specific clientIds.
| return; | ||
| } | ||
|
|
||
| if (isSignup) { |
There was a problem hiding this comment.
I noticed different behavior depending on whether its sign up or sign in, so I mostly copied the logic from Signin/index.tsx and Signup/index.tsx
| default: /^$/, | ||
| env: 'PASSWORDLESS_FORCED_EMAIL_REGEX', | ||
| }, | ||
| allowedClientIds: { |
There was a problem hiding this comment.
Ross mentioned that they wanted to roll this out to settings first, so we might need to update this to support that, not sure how but we can file a follow up.
| const wantsKeys = integration.wantsKeys(); | ||
| const isOAuth = isOAuthWebIntegration(integration); | ||
|
|
||
| // Passwordless eligibility: |
| goToSettingsWithAlertSuccess(); | ||
| } else { | ||
| // Navigate to relying party | ||
| if (origin === 'signup') { |
There was a problem hiding this comment.
Surprised lint didn't catch this but origin isn't defined in file?
| } | ||
| } else { | ||
| const isFullyVerified = | ||
| result.verified && result.verified; |
| *[other] Enter the code that was sent to <email>{ $email }</email> within { $expirationMinutes } minutes. <link>Use a different account</link> | ||
| } | ||
|
|
||
| signin-passwordless-code-input-label = Enter 6-digit code |
|
|
||
| const cmsInfo = integration?.getCmsInfo(); | ||
| // Use SigninTokenCodePage as fallback since SigninPasswordlessCodePage doesn't exist in CMS yet | ||
| const title = (cmsInfo as any)?.SigninPasswordlessCodePage?.pageTitle || |
There was a problem hiding this comment.
I think there might be some types you could use cmsInfo as any
Because
This pull request
Issue that this pull request solves
Closes: #FXA-13017
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.