@@ -607,7 +579,7 @@ export const CIPPM365OAuthButton = ({
!appIdInfo.isLoading &&
appIdInfo?.data?.applicationId && // Only check if applicationId is present in data
!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
- appIdInfo?.data?.applicationId,
+ appIdInfo?.data?.applicationId
) && (
The Application ID is not valid. Please check your configuration.
@@ -622,14 +594,14 @@ export const CIPPM365OAuthButton = ({
{authInProgress ? (
<>
- When asked to log onto an account, please use a{" "}
- CIPP Service Account. Enter this code to authenticate:{" "}
+ When asked to log onto an account, please use a{' '}
+ CIPP Service Account. Enter this code to authenticate:{' '}
>
) : (
<>
Click the button below to authenticate. When asked to log onto an account,
please use a CIPP Service Account. You will need to enter this
- code:{" "}
+ code:{' '}
>
)}
@@ -637,13 +609,13 @@ export const CIPPM365OAuthButton = ({
{authInProgress ? (
<>
- If the popup was blocked or you closed it, you can also go to{" "}
+ If the popup was blocked or you closed it, you can also go to{' '}
microsoft.com/devicelogin manually and enter the code shown
above.
>
) : (
<>
- When you click the button below, a popup will open to{" "}
+ When you click the button below, a popup will open to{' '}
microsoft.com/devicelogin where you'll enter this code.
>
)}
@@ -665,7 +637,7 @@ export const CIPPM365OAuthButton = ({
Tenant ID: {tokens.tenantId}
{tokens.onmicrosoftDomain && (
<>
- {" "}
+ {' '}
| Domain: {tokens.onmicrosoftDomain}
>
)}
@@ -711,21 +683,21 @@ export const CIPPM365OAuthButton = ({
{promptBeforeAuth !== false && (
setPromptDialog({ open: false }),
}}
api={{
- type: "POST",
+ type: 'POST',
confirmText: promptBeforeAuth,
noConfirm: false,
customFunction: () => {
- setPromptDialog({ open: false });
+ setPromptDialog({ open: false })
const authFunction = useDeviceCode
? handleDeviceCodeAuthentication
- : handleMsalAuthentication;
- authFunction();
+ : handleMsalAuthentication
+ authFunction()
},
}}
fields={[]}
@@ -740,17 +712,17 @@ export const CIPPM365OAuthButton = ({
codeRetrievalInProgress ||
(!applicationId &&
!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
- appIdInfo?.data?.applicationId,
+ appIdInfo?.data?.applicationId
))
}
onClick={() => {
if (promptBeforeAuth !== false) {
- setPromptDialog({ open: true });
+ setPromptDialog({ open: true })
} else {
const authFunction = useDeviceCode
? handleDeviceCodeAuthentication
- : handleMsalAuthentication;
- authFunction();
+ : handleMsalAuthentication
+ authFunction()
}
}}
color="primary"
@@ -765,11 +737,11 @@ export const CIPPM365OAuthButton = ({
}
>
{authInProgress || codeRetrievalInProgress
- ? "Authenticating..."
+ ? 'Authenticating...'
: deviceCodeInfo && useDeviceCode
- ? "Authenticate with Code"
+ ? 'Authenticate with Code'
: buttonText}
- );
-};
+ )
+}
diff --git a/src/pages/authredirect.js b/src/pages/authredirect.js
index ea8edfe0937d..a5f4186ea206 100644
--- a/src/pages/authredirect.js
+++ b/src/pages/authredirect.js
@@ -1,47 +1,40 @@
-import { Box, Container, Stack } from "@mui/material";
-import { Grid } from "@mui/system";
+import { useEffect } from "react";
import Head from "next/head";
-import { CippImageCard } from "../components/CippCards/CippImageCard.jsx";
-import { Layout as DashboardLayout } from "../layouts/index.js";
-const Page = () => (
- <>
-