Skip to content

Commit

Permalink
maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapocsi committed Feb 27, 2024
1 parent a2bd332 commit 0a69c15
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/app/signin/OAuthSignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ import { useState, useEffect, use } from "react";
import { signIn, LiteralUnion, ClientSafeProvider, getProviders } from "next-auth/react";
import { Button } from "@/components/ui/button";
import { FaGithub, FaGoogle } from "react-icons/fa";
import { BuiltInProviderType } from "next-auth/providers/index";

export function OAuthSignIn() {
const providers = use(getProviders());
const [providers, setProviders] = useState<Record<
LiteralUnion<BuiltInProviderType, string>,
ClientSafeProvider
> | null>();

useEffect(() => {
const get = async () => {
setProviders(await getProviders());
};
get();
}, []);

if (!providers) {
return;
Expand Down

0 comments on commit 0a69c15

Please sign in to comment.