This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
423bacf
commit 31a11d3
Showing
61 changed files
with
693 additions
and
2,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,9 @@ | ||
import { auth, signIn, signOut } from "@acme/auth"; | ||
import { Button } from "@acme/ui/button"; | ||
import { UserButton } from "@clerk/nextjs"; | ||
|
||
export async function AuthShowcase() { | ||
const session = await auth(); | ||
|
||
if (!session) { | ||
return ( | ||
<form> | ||
<Button | ||
size="lg" | ||
formAction={async () => { | ||
"use server"; | ||
await signIn("discord"); | ||
}} | ||
> | ||
Sign in with Discord | ||
</Button> | ||
</form> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="flex flex-col items-center justify-center gap-4"> | ||
<p className="text-center text-2xl"> | ||
{session && <span>Logged in as {session.user.name}</span>} | ||
</p> | ||
|
||
<form> | ||
<Button | ||
size="lg" | ||
formAction={async () => { | ||
"use server"; | ||
await signOut(); | ||
}} | ||
> | ||
Sign out | ||
</Button> | ||
</form> | ||
<div className="h-screen"> | ||
<UserButton afterSignOutUrl="/" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.