diff --git a/src/service/users/device.rs b/src/service/users/device.rs index b5cf8de7d..af4273d8a 100644 --- a/src/service/users/device.rs +++ b/src/service/users/device.rs @@ -25,11 +25,11 @@ pub struct DeviceToken { } impl DeviceToken { - const DEVICE_ID_LENGTH: usize = 10; + const ACCESS_TOKEN_LENGTH: usize = 24; pub fn new(token: String) -> Self { Self { token, max_age: None } } - pub fn new_random() -> Self { Self::new(utils::random_string(Self::DEVICE_ID_LENGTH)) } + pub fn new_random() -> Self { Self::new(utils::random_string(Self::ACCESS_TOKEN_LENGTH)) } pub fn with_max_age(self, max_age: Duration) -> Self { assign!(self, { max_age: Some(max_age) })