You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use secrets module instead of random for security-sensitive token generation
Replace random.sample() with secrets.choice() for generating PKCE code
verifiers, OAuth2 state parameters, and OIDC nonces. The random module
uses Mersenne Twister which is not cryptographically secure. The secrets
module uses os.urandom(), providing a CSPRNG suitable for security tokens.
This also fixes a subtle entropy reduction caused by random.sample()
drawing without replacement, which prevented character repetition.
0 commit comments