mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Don't send or save email addresses for fedi accounts
This commit is contained in:
@@ -264,7 +264,7 @@ impl AccountProvider {
|
||||
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: pub_id.clone(),
|
||||
email_address: user_info.email,
|
||||
email_address: if is_fedi { format!("{}@{}", user_info.public_id, self.domain) } else { user_info.email },
|
||||
email_verified: true,
|
||||
flags: vec![
|
||||
if is_fedi { "federated=true".to_owned() } else { "federated=false".to_owned() },
|
||||
|
||||
@@ -344,7 +344,11 @@ impl super::AccountProvider {
|
||||
message: e.to_string(),
|
||||
code: crate::data::error_codes::AuthErrorCode::BadCredentials,
|
||||
})?;
|
||||
let mut rc_token = remote_token_data.claims.client_details;
|
||||
rc_token.email_address = format!("{}@{}", rc_token.robocraft_name, self.auth);
|
||||
rc_token.email_verified = true;
|
||||
let local_token_data = crate::auth::Token {
|
||||
client_details: rc_token,
|
||||
iss: self.auth.to_string(),
|
||||
fedi_token: Some(remote_token.to_owned()),
|
||||
..remote_token_data.claims
|
||||
|
||||
@@ -92,7 +92,7 @@ fn default_fedi_user_data(info: &super::FederatedAuthInfo, fedi_id: i32, qualifi
|
||||
public_id: oj_rc_database::sea_orm::ActiveValue::Set(qualified_name.to_owned()),
|
||||
display_name: oj_rc_database::sea_orm::ActiveValue::Set(qualified_name.to_owned()),
|
||||
password: oj_rc_database::sea_orm::ActiveValue::Set(password),
|
||||
email: oj_rc_database::sea_orm::ActiveValue::Set(format!("{}@{}", info.display_name, info.domain)),
|
||||
email: oj_rc_database::sea_orm::ActiveValue::Set("".to_owned()),
|
||||
steam_id: oj_rc_database::sea_orm::ActiveValue::Set(None),
|
||||
federation_id: oj_rc_database::sea_orm::ActiveValue::Set(Some(fedi_id)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user