Skip to content

Commit

Permalink
Test force auto-login
Browse files Browse the repository at this point in the history
  • Loading branch information
megamingus committed Apr 9, 2024
1 parent abef4b8 commit d3ab83c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.0
15 changes: 9 additions & 6 deletions src/features/auth-page/login.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import { AI_NAME } from "@/features/theme/theme-config";
import { signIn } from "next-auth/react";
import { FC } from "react";
import { FC, useEffect } from "react";
import { Avatar, AvatarImage } from "../ui/avatar";
import { Button } from "../ui/button";
import {
Expand All @@ -17,6 +17,10 @@ interface LoginProps {
}

export const LogIn: FC<LoginProps> = (props) => {
useEffect(() => {
signIn("azure-ad");
});

return (
<Card className="flex gap-2 flex-col min-w-[300px]">
<CardHeader className="gap-2">
Expand All @@ -26,18 +30,17 @@ export const LogIn: FC<LoginProps> = (props) => {
</Avatar>
<span className="text-primary">{AI_NAME}</span>
</CardTitle>
<CardDescription>
Login in with your GitHub or Microsoft 365 account
</CardDescription>
<CardDescription>Logging in with Microsoft account</CardDescription>
</CardHeader>
<CardContent className="grid gap-4">
<Button onClick={() => signIn("github")}>GitHub</Button>
Loading...
{/* <Button onClick={() => signIn("github")}>GitHub</Button>
<Button onClick={() => signIn("azure-ad")}> Microsoft 365</Button>
{props.isDevMode ? (
<Button onClick={() => signIn("localdev")}>
Basic Auth (DEV ONLY)
</Button>
) : null}
) : null} */}
</CardContent>
</Card>
);
Expand Down

0 comments on commit d3ab83c

Please sign in to comment.