Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/selfish-crews-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@supabase/auth-ui-react': patch
---

Fix view layout alignment
18 changes: 10 additions & 8 deletions packages/react/src/components/Auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,16 @@ function Auth({
)
case VIEWS.FORGOTTEN_PASSWORD:
return (
<ForgottenPassword
appearance={appearance}
supabaseClient={supabaseClient}
setAuthView={setAuthView}
redirectTo={redirectTo}
showLinks={showLinks}
i18n={i18n}
/>
<Container>
<ForgottenPassword
appearance={appearance}
supabaseClient={supabaseClient}
setAuthView={setAuthView}
redirectTo={redirectTo}
showLinks={showLinks}
i18n={i18n}
/>
</Container>
)

case VIEWS.MAGIC_LINK:
Expand Down
84 changes: 43 additions & 41 deletions packages/react/src/components/Auth/interfaces/ForgottenPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,49 +48,51 @@ function ForgottenPassword({

return (
<form id="auth-forgot-password" onSubmit={handlePasswordReset}>
<Container gap="large" direction="vertical" appearance={appearance}>
<div>
<Label htmlFor="email" appearance={appearance}>
{labels?.email_label}
</Label>
<Input
id="email"
name="email"
type="email"
autoFocus
placeholder={labels?.email_input_placeholder}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setEmail(e.target.value)
}
appearance={appearance}
/>
</div>
<Button
type="submit"
color="primary"
loading={loading}
appearance={appearance}
>
{loading ? labels?.loading_button_label : labels?.button_label}
</Button>
{showLinks && (
<Anchor
href="#auth-sign-in"
onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {
e.preventDefault()
setAuthView(VIEWS.SIGN_IN)
}}
<Container direction="vertical" gap="large" appearance={appearance}>
<Container gap="large" direction="vertical" appearance={appearance}>
<div>
<Label htmlFor="email" appearance={appearance}>
{labels?.email_label}
</Label>
<Input
id="email"
name="email"
type="email"
autoFocus
placeholder={labels?.email_input_placeholder}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setEmail(e.target.value)
}
appearance={appearance}
/>
</div>
<Button
type="submit"
color="primary"
loading={loading}
appearance={appearance}
>
{i18n?.sign_in?.link_text}
</Anchor>
)}
{message && <Message appearance={appearance}>{message}</Message>}
{error && (
<Message color="danger" appearance={appearance}>
{error}
</Message>
)}
{loading ? labels?.loading_button_label : labels?.button_label}
</Button>
{showLinks && (
<Anchor
href="#auth-sign-in"
onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {
e.preventDefault()
setAuthView(VIEWS.SIGN_IN)
}}
appearance={appearance}
>
{i18n?.sign_in?.link_text}
</Anchor>
)}
{message && <Message appearance={appearance}>{message}</Message>}
{error && (
<Message color="danger" appearance={appearance}>
{error}
</Message>
)}
</Container>
</Container>
</form>
)
Expand Down