-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy pathloginModal.tsx
More file actions
46 lines (43 loc) · 1.32 KB
/
loginModal.tsx
File metadata and controls
46 lines (43 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use client';
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { AuthMethodSelector } from "@/app/components/authMethodSelector";
import type { IdentityProviderMetadata } from "@/lib/identityProviders";
interface LoginModalProps {
isOpen: boolean;
onOpenChange: (open: boolean) => void;
providers: IdentityProviderMetadata[];
callbackUrl: string;
}
export const LoginModal = ({
isOpen,
onOpenChange,
providers,
callbackUrl,
}: LoginModalProps) => {
return (
<Dialog open={isOpen} onOpenChange={onOpenChange}>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle className="mb-3">Sign up to continue</DialogTitle>
<DialogDescription>
Sign into your account to continue.
</DialogDescription>
</DialogHeader>
<div className="mt-4">
<AuthMethodSelector
providers={providers}
callbackUrl={callbackUrl}
context="login"
hideSecurityNotice={true}
/>
</div>
</DialogContent>
</Dialog>
);
};