We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46327a4 commit 87597ccCopy full SHA for 87597cc
crates/mcp/oauth/token.rs
@@ -58,7 +58,8 @@ pub struct TokenResponse {
58
/// Generate an opaque refresh token.
59
fn generate_refresh_token() -> String {
60
use rand::Rng as _;
61
- let bytes: [u8; 32] = rand::rng().random();
+ let mut bytes = [0u8; 32];
62
+ rand::rng().fill(&mut bytes);
63
base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(bytes)
64
}
65
0 commit comments