Implement Auth.
This commit is contained in:
10
src/components/auth/No_Session.tsx
Normal file
10
src/components/auth/No_Session.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import Sign_In from "./Sign_In";
|
||||
|
||||
export default function No_Session() {
|
||||
return (
|
||||
<div className="w-2/3 mx-auto text-center pt-10">
|
||||
<h1 className="text-2xl font-semibold">Unauthorized. Please sign in first.</h1>
|
||||
< Sign_In />
|
||||
</div>
|
||||
);
|
||||
};
|
13
src/components/auth/Sign_In.tsx
Normal file
13
src/components/auth/Sign_In.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import { signIn } from "~/auth";
|
||||
|
||||
export default async function Sign_In() {
|
||||
return (
|
||||
<form className="w-full"
|
||||
action={async () => {
|
||||
"use server";
|
||||
await signIn("microsoft-entra-id");
|
||||
}}>
|
||||
<button type="submit" className="w-full">Sign In</button>
|
||||
</form>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user