Init project. Set up auth & db
This commit is contained in:
13
src/app/_components/auth/sign_in_gh.tsx
Normal file
13
src/app/_components/auth/sign_in_gh.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { signIn } from "~/auth"
|
||||
|
||||
export async function SignInGH() {
|
||||
return (
|
||||
<form className="w-full"
|
||||
action={async () => {
|
||||
"use server";
|
||||
await signIn("github");
|
||||
}}>
|
||||
<button className="w-full" type="submit">Sign In With GitHub</button>
|
||||
</form>
|
||||
);
|
||||
}
|
13
src/app/_components/auth/sign_out.tsx
Normal file
13
src/app/_components/auth/sign_out.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { signOut } from "~/auth"
|
||||
|
||||
export function SignOut() {
|
||||
return (
|
||||
<form className="w-full"
|
||||
action={async () => {
|
||||
"use server"
|
||||
await signOut()
|
||||
}}>
|
||||
<button type="submit" className="w-full">Sign Out</button>
|
||||
</form>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user