Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function AuthEntryPanel({
password,
rememberMe
});
setFeedback('Check your email for a link to confirm your address and sign in.');
setFeedback('Check your email to confirm your address, then sign in with your password.');
} else if (mode === 'recover-password') {
if (!actions?.recoverPassword) return;
await actions.recoverPassword({ email: email.trim() });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ describe('authentication feature-pack flows', () => {
expect(screen.getByText('Password must be at least 8 characters.')).toBeInTheDocument();
});

it('tells a new account to confirm its email, then sign in with its password', async () => {
const user = userEvent.setup();
const signUp = vi.fn().mockResolvedValue(undefined);
const { container } = render(
<AuthFeaturePack
actions={{ signUp }}
mode='sign-up'
policy={{ signUp: true }}
view='entry'
/>
);

await user.type(screen.getByRole('textbox', { name: 'Email address' }), 'ada@example.com');
await user.type(container.querySelector('input[name="password"]')!, 'correct horse');
await user.click(screen.getByRole('button', { name: 'Create account' }));

expect(await screen.findByRole('status')).toHaveTextContent(
'Check your email to confirm your address, then sign in with your password.'
);
});

it('requires named confirmation and password step-up before requesting deletion', async () => {
const user = userEvent.setup();
const requestAccountDeletion = vi.fn().mockResolvedValue(undefined);
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets/src/auth/ui/register-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function SheetsRegisterForm({ onRegister, onShowLogin, defaultEmail = ''
<div className='space-y-1.5'>
<h3 className='text-lg font-semibold'>Check your email</h3>
<p className='text-muted-foreground text-sm'>
We&apos;ve sent a link to confirm your address and sign in.
We&apos;ve sent a link to confirm your address. Open it, then sign in with your password.
</p>
</div>
</div>
Expand Down
Loading