@@ -42,12 +42,12 @@ export const LOGIN_WITH_2FA = gql`
4242 mutation LoginWithTwoFactorAuthentication(
4343 $email: String!
4444 $otp: String!
45- $TwoWayVerificationToken: String!
45+ # $TwoWayVerificationToken: String!
4646 ) {
4747 loginWithTwoFactorAuthentication(
4848 email: $email
4949 otp: $otp
50- TwoWayVerificationToken: $TwoWayVerificationToken
50+ # TwoWayVerificationToken: $TwoWayVerificationToken
5151 ) {
5252 token
5353 user {
@@ -84,7 +84,7 @@ const TwoFactorPage: React.FC = () => {
8484
8585 const location = useLocation ( ) ;
8686 const navigate = useNavigate ( ) ;
87- const { email, TwoWayVerificationToken } = location . state || { } ;
87+ const { email } = location . state || { } ;
8888 useEffect ( ( ) => {
8989 // Update document class and localStorage when theme changes
9090 if ( isDark ) {
@@ -97,18 +97,18 @@ const TwoFactorPage: React.FC = () => {
9797 } , [ isDark ] ) ;
9898
9999 useEffect ( ( ) => {
100- if ( ! email || ! TwoWayVerificationToken ) {
100+ if ( ! email ) {
101101 navigate ( '/login' ) ;
102102 }
103- } , [ email , TwoWayVerificationToken , navigate ] ) ;
103+ } , [ email , navigate ] ) ;
104104
105105 const [ loginWithTwoFactorAuthentication ] = useMutation < LoginResponse > (
106106 LOGIN_WITH_2FA ,
107107 {
108108 onCompleted : async ( data ) => {
109109 const response = data . loginWithTwoFactorAuthentication ;
110110 try {
111- localStorage . setItem ( 'authToken' , response . token ) ;
111+ // localStorage.setItem('authToken', response.token);
112112 localStorage . setItem ( 'user' , JSON . stringify ( response . user ) ) ;
113113 await login ( response ) ;
114114 await client . resetStore ( ) ;
@@ -152,7 +152,7 @@ const TwoFactorPage: React.FC = () => {
152152 variables : {
153153 email,
154154 otp : currentInput . join ( '' ) ,
155- TwoWayVerificationToken,
155+ // TwoWayVerificationToken,
156156 } ,
157157 } ) ;
158158 } finally {
0 commit comments