The CSRF token is using 64 bits of entropy : ~~~ sha256 = hashlib.sha256() sha256.update(os.urandom(8)) token = sha256.hexdigest().encode(ENCODING) response.set_cookie(token_name, token, path=path, secret=secret, max_age=expires) request.csrf_token = token.decode(ENCODING) ~~~ Apparently, the [128 bits of entropy is considered a minimum](https://www.owasp.org/index.php/Insufficient_Session-ID_Length) these days, the OWASP example is using 512 bits of entropy.
The CSRF token is using 64 bits of entropy :
Apparently, the 128 bits of entropy is considered a minimum these days, the OWASP example is using 512 bits of entropy.