feat: Allow OAuth users to add passwords

This commit is contained in:
gpt-engineer-app[bot]
2025-10-14 14:45:51 +00:00
parent 6430777dc0
commit 8594291ad2
2 changed files with 69 additions and 21 deletions

View File

@@ -19,14 +19,16 @@ interface PasswordSetupDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
onSuccess: () => void;
provider: OAuthProvider;
provider?: OAuthProvider;
mode?: 'standalone' | 'disconnect';
}
export function PasswordSetupDialog({
open,
onOpenChange,
onSuccess,
provider
provider,
mode = 'standalone'
}: PasswordSetupDialogProps) {
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
@@ -73,8 +75,17 @@ export function PasswordSetupDialog({
<DialogTitle>Set Up Password</DialogTitle>
</div>
<DialogDescription>
You need to set a password before disconnecting your {provider} account.
This ensures you can still access your account.
{mode === 'disconnect' && provider ? (
<>
You need to set a password before disconnecting your {provider} account.
This ensures you can still access your account.
</>
) : (
<>
Add a password to your account for increased security. You'll be able to
sign in using either your password or your connected social accounts.
</>
)}
</DialogDescription>
</DialogHeader>