1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Fix some minor typos & bugs; #123

This commit is contained in:
NG (Graham)
2026-07-05 16:28:20 -04:00
committed by NGnius
parent 2adf8249bb
commit 1dc502af32
7 changed files with 8 additions and 10 deletions

View File

@@ -30,9 +30,9 @@ fn default_aliases() -> std::collections::HashMap<String, String> {
fn default_defederated() -> Vec<String> {
vec![
"robocraftgame.com".to_owned(),
#[cfg(debug_assertions)]
#[cfg(not(debug_assertions))]
{ "127.0.0.1:8002".to_owned() },
#[cfg(debug_assertions)]
#[cfg(not(debug_assertions))]
{ "127.0.0.1".to_owned() },
]
}

View File

@@ -263,7 +263,7 @@ impl AccountProvider {
let client_details = libfj::robocraft::TokenPayload {
public_id: pub_id.clone(),
display_name: if is_fedi { format!("{}#{}", user_info.display_name, self.domain) } else { user_info.display_name.clone() },
robocraft_name: if is_fedi { format!("{}#{}", user_info.public_id, self.domain) } else { user_info.public_id.clone() },
robocraft_name: pub_id.clone(),
email_address: user_info.email,
email_verified: true,
flags: vec![

View File

@@ -131,7 +131,7 @@ impl super::AccountProvider {
|| target_domain == "0:0:0:0:0:0:0:1"
|| target_domain.starts_with("127.0.0.")
|| target_domain.starts_with("localhost:");
// TODO contact other domain
// contact other domain to get oauth (auth) and root server
let social_urls_api = if is_localhost {
format!("http://{}/{}", target_domain, SOCIETY_URLS_API_ENDPOINT)
} else {
@@ -236,7 +236,6 @@ impl super::AccountProvider {
code: crate::data::error_codes::AuthErrorCode::BadCredentials,
});
};
//let auth_redirected_url = auth_resp.url();
log::debug!("OAuth auth response URL: {}", auth_redirected_url);
let mut query_map: std::collections::HashMap<_, _> = auth_redirected_url.query_pairs().collect();
let auth_code = if let Some(auth_code) = query_map.remove("code") {