Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

merge main

Scott Wilson524d5e42c990
diff --cc frontend/src/components/auth/UserInfoStep.tsx
index 8bbc12f8f8,f464104f98..9e6cd8d2d2
--- a/frontend/src/components/auth/UserInfoStep.tsx
+++ b/frontend/src/components/auth/UserInfoStep.tsx
@@@ -149,122 -170,180 +149,126 @@@ export default function UserInfoStep(
</CardTitle>
</CardHeader>
<CardContent className="flex flex-col gap-4">
- {!isAttributionStep && (
- <>
- <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
- <Field data-invalid={showDangerState && Boolean(errors.firstName)}>
- <FieldLabel className="sr-only" htmlFor="signup-first-name">
- First Name
- </FieldLabel>
- <Input
- variant="outlined"
- {...register("firstName")}
- id="signup-first-name"
- placeholder="First Name"
- autoComplete="given-name"
- isError={showDangerState && Boolean(errors.firstName)}
- />
- {showDangerState && errors.firstName ? (
- <FieldError>{errors.firstName.message}</FieldError>
- ) : null}
- </Field>
- <Field data-invalid={showDangerState && Boolean(errors.lastName)}>
- <FieldLabel className="sr-only" htmlFor="signup-last-name">
- Last Name
- </FieldLabel>
- <Input
- variant="outlined"
- {...register("lastName")}
- id="signup-last-name"
- placeholder="Last Name"
- autoComplete="family-name"
- isError={showDangerState && Boolean(errors.lastName)}
- />
- {showDangerState && errors.lastName ? (
- <FieldError>{errors.lastName.message}</FieldError>
- ) : null}
- </Field>
- </div>
- {!isInvite && (
- <Field data-invalid={showOrganizationNameError}>
- <FieldLabel className="sr-only" htmlFor="signup-organization-name">
- Organization Name
- </FieldLabel>
- <Input
- variant="outlined"
- {...register("organizationName")}
- id="signup-organization-name"
- placeholder="Organization Name"
- maxLength={64}
- autoComplete="organization"
- isError={showOrganizationNameError}
- />
- {showOrganizationNameError && errors.organizationName ? (
- <FieldError>{errors.organizationName.message}</FieldError>
- ) : null}
- </Field>
- )}
- <PasswordField
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
+ <Field data-invalid={showDangerState && Boolean(errors.firstName)}>
+ <FieldLabel className="sr-only" htmlFor="signup-first-name">
+ First Name
+ </FieldLabel>
+ <Input
+ variant="outlined"
- id="new-password"
- value={passwordValue}
- policy={config.passwordPolicy}
- breachStatus={passwordBreachStatus}
- placeholder="••••••••"
- registration={register("password")}
- error={showDangerState ? errors.password : undefined}
- submitCount={submitCount}
+ {...register("firstName")}
+ id="signup-first-name"
+ placeholder="First Name"
+ autoComplete="given-name"
+ isError={showDangerState && Boolean(errors.firstName)}
/>
- <AnimatedCollapse
- isOpen={isPasswordValidated}
- contentClassName={isPasswordValidated ? "overflow-visible" : undefined}
- >
- <Field data-invalid={showDangerState && Boolean(errors.confirmPassword)}>
- <FieldLabel htmlFor="confirm-password">Confirm Password</FieldLabel>
- <InputGroup variant="outlined">
- <InputGroupInput
- {...register("confirmPassword")}
- id="confirm-password"
- type={showConfirmPassword ? "text" : "password"}
- placeholder="••••••••"
- autoComplete="new-password"
- aria-invalid={showDangerState && Boolean(errors.confirmPassword)}
- />
- <InputGroupAddon align="inline-end">
- <InputGroupButton
- onClick={() => setShowConfirmPassword((current) => !current)}
- aria-label={
- showConfirmPassword
- ? "Hide password confirmation"
- : "Show password confirmation"
- }
- >
- {showConfirmPassword ? <EyeOff /> : <Eye />}
- </InputGroupButton>
- </InputGroupAddon>
- </InputGroup>
- <AnimatedCollapse isOpen={confirmPasswordValue.length > 0}>
- <div className="flex items-start gap-2 pt-1 text-xs" aria-live="polite">
- {doPasswordsMatch ? (
- <Check className="mt-0.5 size-3.5 shrink-0 text-success" />
- ) : (
- <X className="mt-0.5 size-3.5 shrink-0 text-danger" />
- )}
- <span className={doPasswordsMatch ? "text-muted" : "text-danger"}>
- {doPasswordsMatch ? "Passwords match" : "Passwords do not match"}
- </span>
- </div>
- </AnimatedCollapse>
- {showDangerState && errors.confirmPassword ? (
- <FieldError>{errors.confirmPassword.message}</FieldError>
- ) : null}
- </Field>
- </AnimatedCollapse>
- {isInvite ? (
- <Button
- type="submit"
- onClick={handleSubmit(onSubmit)}
- variant="project"
- size="lg"
- isFullWidth
- isPending={isLoading}
- isDisabled={!canSubmit}
- >
- {String(submitLabel)}
- </Button>
- ) : (
- <Button
- variant="project"
- size="lg"
- isFullWidth
- isDisabled={!canSubmit}
- onClick={handleSubmit(() => setIsAttributionStep(true))}
- >
- Continue
- </Button>
- )}
- </>
+ {showDangerState && errors.firstName ? (
+ <FieldError>{errors.firstName.message}</FieldError>
+ ) : null}
+ </Field>
+ <Field data-invalid={showDangerState && Boolean(errors.lastName)}>
+ <FieldLabel className="sr-only" htmlFor="signup-last-name">
+ Last Name
+ </FieldLabel>
+ <Input
++ variant="outlined"
+ {...register("lastName")}
+ id="signup-last-name"
+ placeholder="Last Name"
+ autoComplete="family-name"
+ isError={showDangerState && Boolean(errors.lastName)}
+ />
+ {showDangerState && errors.lastName ? (
+ <FieldError>{errors.lastName.message}</FieldError>
+ ) : null}
+ </Field>
+ </div>
+ {!isInvite && (
+ <Field data-invalid={showOrganizationNameError}>
+ <FieldLabel className="sr-only" htmlFor="signup-organization-name">
+ Organization Name
+ </FieldLabel>
+ <Input
++ variant="outlined"
+ {...register("organizationName")}
+ id="signup-organization-name"
+ placeholder="Organization Name"
+ maxLength={64}
+ autoComplete="organization"
+ isError={showOrganizationNameError}
+ />
+ {showOrganizationNameError && errors.organizationName ? (
+ <FieldError>{errors.organizationName.message}</FieldError>
+ ) : null}
+ </Field>
)}
- {isAttributionStep && (
- <>
- <Field>
- <FieldLabel className="sr-only" htmlFor="signup-attribution-source">
- Where did you hear about us? <span className="font-light">(optional)</span>
- </FieldLabel>
- <TextArea
- variant="outlined"
- {...register("attributionSource")}
- id="signup-attribution-source"
- placeholder="Where did you hear about us? (optional)"
- rows={3}
- autoFocus
+ <PasswordField
++ variant="outlined"
+ id="new-password"
+ value={passwordValue}
+ policy={config.passwordPolicy}
+ breachStatus={passwordBreachStatus}
+ placeholder="••••••••"
+ registration={register("password")}
+ error={showDangerState ? errors.password : undefined}
+ submitCount={submitCount}
+ />
+ <AnimatedCollapse
+ isOpen={isPasswordValidated}
+ contentClassName={isPasswordValidated ? "overflow-visible" : undefined}
+ >
+ <Field data-invalid={showDangerState && Boolean(errors.confirmPassword)}>
+ <FieldLabel htmlFor="confirm-password">Confirm Password</FieldLabel>
- <InputGroup>
++ <InputGroup variant="outlined">
+ <InputGroupInput
+ {...register("confirmPassword")}
+ id="confirm-password"
+ type={showConfirmPassword ? "text" : "password"}
+ placeholder="••••••••"
+ autoComplete="new-password"
+ aria-invalid={showDangerState && Boolean(errors.confirmPassword)}
/>
- </Field>
- <div className="flex flex-col gap-2">
- <Button
- type="submit"
- onClick={handleSubmit(onSubmit, onInvalidSubmit)}
- variant="project"
- size="lg"
- isFullWidth
- isPending={isLoading}
- isDisabled={!canSubmit}
- >
- {String(submitLabel)}
- </Button>
- <Button
- variant="outline"
- size="lg"
- isFullWidth
- onClick={() => setIsAttributionStep(false)}
- >
- Back
- </Button>
- </div>
- </>
- )}
+ <InputGroupAddon align="inline-end">
+ <InputGroupButton
+ onClick={() => setShowConfirmPassword((current) => !current)}
+ aria-label={
+ showConfirmPassword
+ ? "Hide password confirmation"
+ : "Show password confirmation"
+ }
+ >
+ {showConfirmPassword ? <EyeOff /> : <Eye />}
+ </InputGroupButton>
+ </InputGroupAddon>
+ </InputGroup>
+ <AnimatedCollapse isOpen={confirmPasswordValue.length > 0}>
+ <div className="flex items-start gap-2 pt-1 text-xs" aria-live="polite">
+ {doPasswordsMatch ? (
+ <Check className="mt-0.5 size-3.5 shrink-0 text-success" />
+ ) : (
+ <X className="mt-0.5 size-3.5 shrink-0 text-danger" />
+ )}
+ <span className={doPasswordsMatch ? "text-muted" : "text-danger"}>
+ {doPasswordsMatch ? "Passwords match" : "Passwords do not match"}
+ </span>
+ </div>
+ </AnimatedCollapse>
+ {showDangerState && errors.confirmPassword ? (
+ <FieldError>{errors.confirmPassword.message}</FieldError>
+ ) : null}
+ </Field>
+ </AnimatedCollapse>
+ <Button
+ type="submit"
+ onClick={handleSubmit(onSubmit)}
+ variant="project"
+ size="lg"
+ isFullWidth
+ isPending={isLoading}
+ isDisabled={!canSubmit}
+ >
+ {submitLabel}
+ </Button>
</CardContent>
</AuthPagePanel>
</div>