// ** React Imports import { Ref, useState, forwardRef, ReactElement } from 'react' // ** MUI Imports import Box from '@mui/material/Box' import Card from '@mui/material/Card' import Grid from '@mui/material/Grid' import Alert from '@mui/material/Alert' import Dialog from '@mui/material/Dialog' import Button from '@mui/material/Button' import TextField from '@mui/material/TextField' import AlertTitle from '@mui/material/AlertTitle' import IconButton from '@mui/material/IconButton' import Typography from '@mui/material/Typography' import CardContent from '@mui/material/CardContent' import Fade, { FadeProps } from '@mui/material/Fade' import DialogContent from '@mui/material/DialogContent' import Image from 'next/image' // ** Icon Imports import Icon from 'src/@core/components/icon' // ** Hooks import useBgColor from 'src/@core/hooks/useBgColor' import { useSettings } from 'src/@core/hooks/useSettings' const Transition = forwardRef(function Transition( props: FadeProps & { children?: ReactElement }, ref: Ref ) { return }) const DialogAuthentication = () => { // ** States const [show, setShow] = useState(false) const [authType, setAuthType] = useState<'app' | 'sms'>('app') const [showAuthDialog, setShowAuthDialog] = useState(false) // ** Hooks const bgColors = useBgColor() const { settings } = useSettings() // ** Var const { direction } = settings const handleClose = () => { setShow(false) setAuthType('app') } const handleAuthDialogClose = () => { if (show) { setShow(false) } setShowAuthDialog(false) if (authType !== 'app') { setTimeout(() => { setAuthType('app') }, 250) } } const arrowIcon = direction === 'ltr' ? 'mdi:chevron-right' : 'mdi:chevron-left' return ( Two Factor Auth Enhance your application security by enabling two factor authentication. [`${theme.spacing(5)} !important`, `${theme.spacing(15)} !important`], py: theme => [`${theme.spacing(8)} !important`, `${theme.spacing(12.5)} !important`] }} > Select Authentication Method You also need to select a method by which the proxy authenticates to the directory serve. setAuthType('app')} sx={{ pt: 4, pb: 2.75, px: 7.2, borderRadius: 1, cursor: 'pointer', ...(authType === 'app' ? { ...bgColors.primaryLight } : { backgroundColor: 'action.hover' }), border: theme => `1px solid ${authType === 'app' ? theme.palette.primary.main : theme.palette.secondary.main}`, ...(authType === 'app' ? { ...bgColors.primaryLight } : { backgroundColor: bgColors.secondaryLight.backgroundColor }) }} >
Authenticator Apps Get code from an app like Google Authenticator or Microsoft Authenticator.
setAuthType('sms')} sx={{ pt: 4, pb: 2.75, px: 7.2, borderRadius: 1, cursor: 'pointer', ...(authType === 'sms' ? { ...bgColors.primaryLight } : { backgroundColor: 'action.hover' }), border: theme => `1px solid ${authType === 'sms' ? theme.palette.primary.main : theme.palette.secondary.main}`, ...(authType === 'sms' ? { ...bgColors.primaryLight } : { backgroundColor: bgColors.secondaryLight.backgroundColor }) }} >
sms We will send a code via SMS if you need to use your backup login method.
[`${theme.spacing(5)} !important`, `${theme.spacing(15)} !important`], py: theme => [`${theme.spacing(8)} !important`, `${theme.spacing(12.5)} !important`] }} > {authType === 'sms' ? (
Verify Your Mobile Number for SMS Enter your mobile phone number with country code and we will send you a verification code.
) : (
Add Authenticator App Authenticator Apps Using an authenticator app like Google Authenticator, Microsoft Authenticator, Authy, or 1Password, scan the QR code. It will generate a 6 digit code for you to enter below. qr-code ASDLKNASDA9AHS678dGhASD78AB If you having trouble using the QR code, select manual entry on your app
)}
) } export default DialogAuthentication