{resendMsg}
} - -{error}
} - - setOTP(e.target.value)} - /> - - > - )} -Choose another secure sign-in method.
+ ++ If an account exists for this address, we sent a secure sign-in link. +
+ ++ Open the email and click the link to finish signing in. +
+ ++ Didn’t receive anything? Check your spam folder or try creating a new account. +
+ ++ We sent you a verification email. Enter the code below. +
+ + {error &&{error}
} + {resendMsg &&{resendMsg}
} + + +- ❌ This device doesn't support passkey login. You must provide or register a - passkey. -
- ) : ( - <> - - > - )} + +{formErrors}
} + + + > ); diff --git a/src/PassKeyLogin.tsx b/src/views/PassKeyLogin.tsx similarity index 94% rename from src/PassKeyLogin.tsx rename to src/views/PassKeyLogin.tsx index bdf1e51..6655534 100644 --- a/src/PassKeyLogin.tsx +++ b/src/views/PassKeyLogin.tsx @@ -4,8 +4,8 @@ import { useInternalAuth } from '@/context/InternalAuthContext'; import React from 'react'; import { useNavigate } from 'react-router-dom'; -import styles from './styles/passKeyLogin.module.css'; -import { createFetchWithAuth } from './fetchWithAuth'; +import styles from '@/styles/passKeyLogin.module.css'; +import { createFetchWithAuth } from '../fetchWithAuth'; const PassKeyLogin: React.FC = () => { const navigate = useNavigate(); diff --git a/src/RegisterPassKey.tsx b/src/views/PassKeyRegistration.tsx similarity index 94% rename from src/RegisterPassKey.tsx rename to src/views/PassKeyRegistration.tsx index 62f8252..483d4aa 100644 --- a/src/RegisterPassKey.tsx +++ b/src/views/PassKeyRegistration.tsx @@ -9,11 +9,11 @@ import React, { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import styles from '@/styles/registerPasskey.module.css'; -import { isPasskeySupported, parseUserAgent } from './utils'; -import { createFetchWithAuth } from './fetchWithAuth'; -import DeviceNameModal from './components/DeviceNameModal'; +import { isPasskeySupported, parseUserAgent } from '@/utils'; +import { createFetchWithAuth } from '@/fetchWithAuth'; +import DeviceNameModal from '@/components/DeviceNameModal'; -const RegisterPasskey: React.FC = () => { +const PasskeyRegistration: React.FC = () => { const { apiHost, mode } = useAuth(); const { validateToken } = useInternalAuth(); const navigate = useNavigate(); @@ -177,4 +177,4 @@ const RegisterPasskey: React.FC = () => { ); }; -export default RegisterPasskey; +export default PasskeyRegistration; diff --git a/src/VerifyOTP.tsx b/src/views/PhoneRegistration.tsx similarity index 51% rename from src/VerifyOTP.tsx rename to src/views/PhoneRegistration.tsx index b4387db..1df048a 100644 --- a/src/VerifyOTP.tsx +++ b/src/views/PhoneRegistration.tsx @@ -2,21 +2,19 @@ import { useAuth } from '@/AuthProvider'; import React, { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import styles from './styles/verifyOTP.module.css'; -import { createFetchWithAuth } from './fetchWithAuth'; +import styles from '@/styles/verifyOTP.module.css'; +import { createFetchWithAuth } from '../fetchWithAuth'; +import OtpInput from '@/components/OtpInput'; -const VerifyOTP: React.FC = () => { +const PhoneRegistration: React.FC = () => { const navigate = useNavigate(); const { apiHost, mode } = useAuth(); - const [emailOtp, setEmailOtp] = useState(''); const [phoneOtp, setPhoneOtp] = useState(''); const [phoneVerified, setPhoneVerified] = useState- Enter the codes sent to your email and phone number. -
+Enter the code sent to your phone number.
{error &&{error}
} {resendMsg &&{resendMsg}
}