I'm trying to generate auth token in my django project.When i inspect source code of django-rest framework, they seem to generate auth_token using:-
binascii.hexlify(os.urandom(20)).decode()
but auth_token should be unique so that i can find corresponding user from auth_token.What is the best possible way of generating auth token, uuid
or same as that of drf framework?