Add Azure auth

This commit is contained in:
Darren Clarke 2025-01-20 11:25:13 +01:00
parent c402000f12
commit 0b7417a788
2 changed files with 29 additions and 0 deletions

View file

@ -12,6 +12,7 @@ import {
import {
Apple as AppleIcon,
Google as GoogleIcon,
Microsoft as MicrosoftIcon,
Key as KeyIcon,
} from "@mui/icons-material";
import { signIn, getProviders } from "next-auth/react";
@ -182,6 +183,21 @@ export const Login: FC<LoginProps> = ({ session }) => {
</IconButton>
</Grid>
)}
{provider === "azure-ad" && (
<Grid item sx={{ width: "100%" }}>
<IconButton
sx={buttonStyles}
onClick={() =>
signIn("azure-ad", {
callbackUrl: `${origin}`,
})
}
>
<MicrosoftIcon sx={{ mr: 1 }} />
Sign in with Azure
</IconButton>
</Grid>
)}
{provider === "credentials" && (
<Grid item container spacing={3}>
<Grid item sx={{ width: "100%" }}>