mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Use steam ID for reliable, persistent CL user auth
This commit is contained in:
@@ -3,10 +3,11 @@ use rocket::{post, routes, serde::json::Json};
|
||||
|
||||
#[post("/api/auth/temporarygetuserid", data = "<body>")]
|
||||
pub fn temp_migration(body: Json<libfj::cardlife::TempGetUserIdPayload>) -> Json<libfj::cardlife::TempGetUserIdResponse> {
|
||||
let steam_id = uuid::Uuid::parse_str(&body.public_id).map(|guid| guid.as_u64_pair().0).unwrap_or(123456);
|
||||
Json(libfj::cardlife::TempGetUserIdResponse {
|
||||
public_id: body.public_id.to_owned(),
|
||||
token: body.token.to_owned(),
|
||||
user_id: 123456, // FIXME
|
||||
user_id: (steam_id & (i32::MAX as u64)) as i32,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user