react-auth-client
react-auth-client copied to clipboard
Open socket only on auth
Because I was wondering if it isn’t a waste of resources to open a socket every time someone hits the site, e.g. when the login buttons are implemented into the header and they don't even intend to login, I decided to modify your example a bit to let it only open a socket when someone actually hits the login button, and also close the socket after the login is done.
Thanks Christopher! Going to leave this open in case other folks are looking to solve the same problem they can grab your branch. Cheers