session' does not exist in twoFactor

client.twoFactor
      .verifyTotp({
        code: totpCode,
      })
      .then((res) => {
        if (res.data?.session) {
          setSuccess(true);
          setError('');
        } else {
          setError('Invalid TOTP code');
        }
      });


Type error: Property 'session' does not exist on type '{ token: string; }'.
Was this page helpful?