This might be a security concern, even though the user will have to
provide an email to retrieve user information.
This functionality is needed by Team management functionality because
expecting users to add a user by id is hard.
TODO: explore other options. Maybe add public profiles and request the
user to go to the profile to invite a user to team?
Also fix CSRF token. This was probably broken since csurf middleware was
modified to use cookie instead of session storage to provide support for
single page app (SPA).
This is especially important for comments-server, because ts-node will
use compiled js files from @rondo/server - that's just how node's module
resolution works and I do not think there's anything that we can do to
change that
react-router v4 was made before React introduced a more performant
function renderToNodeStream to replace renderToString. All guides for
react-router are made using renderToString method, but I would love to
use the renderToNodeStream instead.
Since we cannot issue a 302 redirect after the page has already been
rendered (because status codes are written first), we can display a
<a> link with a text message. Once the React client-side library
hydrates the DOM Tree, the redirect should happen client side, so no
user action should be required.
This idea was taken from:
https://github.com/ReactTraining/react-router/issues/6191