JAVA-044 / Beginner
Generating tokens with java.util.Random
Why is this a problem?
Reset tokens can be guessed by predicting the seed.
How to fix it
java
byte[] b = new byte[32]; new SecureRandom().nextBytes(b);
String token = Base64.getUrlEncoder().withoutPadding().encodeToString(b);