···105in the pds gateekeper container and it will use them in place of the default ones. Just make sure ot keep the names the
106same.
107000108`PDS_BASE_URL` - Base url of the PDS. You most likely want `https://localhost:3000` which is also the default
109110`GATEKEEPER_HOST` - Host for pds gatekeeper. Defaults to `127.0.0.1`
···105in the pds gateekeper container and it will use them in place of the default ones. Just make sure ot keep the names the
106same.
107108+`GATEKEEPER_TWO_FACTOR_EMAIL_SUBJECT` - Subject of the email sent to the user when they turn on 2FA. Defaults to
109+`Sign in to Bluesky`
110+111`PDS_BASE_URL` - Base url of the PDS. You most likely want `https://localhost:3000` which is also the default
112113`GATEKEEPER_HOST` - Host for pds gatekeeper. Defaults to `127.0.0.1`
···15use serde_json::{Map, Value};
16use sha2::{Digest, Sha256};
17use sqlx::SqlitePool;
018use tracing::{error, log};
1920///Used to generate the email 2fa code
···134 full_code.push(UPPERCASE_BASE32_CHARS[idx] as char);
135 }
136137- //The PDS implementation creates in lowercase, then converts to uppercase.
138- //Just going a head and doing uppercase here.
139- let slice_one = &full_code[0..5].to_ascii_uppercase();
140- let slice_two = &full_code[5..10].to_ascii_uppercase();
141 format!("{slice_one}-{slice_two}")
142}
143···334 let email_body = state
335 .template_engine
336 .render("two_factor_code.hbs", email_data)?;
00337338 let email_message = Message::builder()
339 //TODO prob get the proper type in the state
340 .from(state.mailer_from.parse()?)
341 .to(email.parse()?)
342- .subject("Sign in to Bluesky")
343 .multipart(
344 MultiPart::alternative() // This is composed of two parts.
345 .singlepart(
···15use serde_json::{Map, Value};
16use sha2::{Digest, Sha256};
17use sqlx::SqlitePool;
18+use std::env;
19use tracing::{error, log};
2021///Used to generate the email 2fa code
···135 full_code.push(UPPERCASE_BASE32_CHARS[idx] as char);
136 }
137138+ let slice_one = &full_code[0..5];
139+ let slice_two = &full_code[5..10];
00140 format!("{slice_one}-{slice_two}")
141}
142···333 let email_body = state
334 .template_engine
335 .render("two_factor_code.hbs", email_data)?;
336+ let email_subject = env::var("GATEKEEPER_TWO_FACTOR_EMAIL_SUBJECT")
337+ .unwrap_or("Sign in to Bluesky".to_string());
338339 let email_message = Message::builder()
340 //TODO prob get the proper type in the state
341 .from(state.mailer_from.parse()?)
342 .to(email.parse()?)
343+ .subject(email_subject)
344 .multipart(
345 MultiPart::alternative() // This is composed of two parts.
346 .singlepart(
-1
src/xrpc/com_atproto_server.rs
···87 )
88 }
89 AuthResult::ProxyThrough => {
90- log::info!("Proxying through");
91 //No 2FA or already passed
92 let uri = format!(
93 "{}{}",
···87 )
88 }
89 AuthResult::ProxyThrough => {
090 //No 2FA or already passed
91 let uri = format!(
92 "{}{}",