feat: implement basic oauth authentication
This commit is contained in:
parent
9cfc799a9b
commit
d86c86e137
8 changed files with 120 additions and 0 deletions
14
src/components/user/signin-button.tsx
Normal file
14
src/components/user/signin-button.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { signIn } from '@/auth';
|
||||
|
||||
export default function SignIn() {
|
||||
return (
|
||||
<form
|
||||
action={async () => {
|
||||
'use server';
|
||||
await signIn('authentik');
|
||||
}}
|
||||
>
|
||||
<button type='submit'>Signin with Authentik</button>
|
||||
</form>
|
||||
);
|
||||
}
|
14
src/components/user/signout-button.tsx
Normal file
14
src/components/user/signout-button.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { signOut } from '@/auth';
|
||||
|
||||
export function SignOut() {
|
||||
return (
|
||||
<form
|
||||
action={async () => {
|
||||
'use server';
|
||||
await signOut();
|
||||
}}
|
||||
>
|
||||
<button type='submit'>Sign Out</button>
|
||||
</form>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue