I want to generate a dynamic socket namespace whenever someone registers (that namespace should be the id of user or whatever). But, the idea is that whenever any user registers, they get an API Key from my server and then they can use that key on their frontend to connect with my socket server. Now, of course the clients will be all different so I will need to generate dynamic namespace for each user.
I have thought about looping over user's collection and then creating a namespace for each user id, but the problem is that what if someone makes a new account? My socket server will already be running and it won't generate a new namespace again.