I want to create unique string ids that will be used in a user management system. I want each user to have a string that allows them to access their own database on a server. I read here that you can use the secrets module to create random strings, but since I don't know anything about user management I'm not sure whether to trust the pseudo-random numbers that lie behind the secrets package.
Question: Is it safe to generate a string for each user like this
secrets.token_hex(nbytes = 50)
Out[8]: '24d72775ae86151c600b6a64cef7191e2a55271615894a0ad3b05671978add68a16ad2beb66fa87e66ccdcc442ef4e57e9a4'
and let them use that string to identify themselves to enter the database on my server? Is there a better way that is as quick?