···105105in the pds gateekeper container and it will use them in place of the default ones. Just make sure ot keep the names the
106106same.
107107108108+`GATEKEEPER_TWO_FACTOR_EMAIL_SUBJECT` - Subject of the email sent to the user when they turn on 2FA. Defaults to
109109+`Sign in to Bluesky`
110110+108111`PDS_BASE_URL` - Base url of the PDS. You most likely want `https://localhost:3000` which is also the default
109112110113`GATEKEEPER_HOST` - Host for pds gatekeeper. Defaults to `127.0.0.1`
···1515use serde_json::{Map, Value};
1616use sha2::{Digest, Sha256};
1717use sqlx::SqlitePool;
1818+use std::env;
1819use tracing::{error, log};
19202021///Used to generate the email 2fa code
···134135 full_code.push(UPPERCASE_BASE32_CHARS[idx] as char);
135136 }
136137137137- //The PDS implementation creates in lowercase, then converts to uppercase.
138138- //Just going a head and doing uppercase here.
139139- let slice_one = &full_code[0..5].to_ascii_uppercase();
140140- let slice_two = &full_code[5..10].to_ascii_uppercase();
138138+ let slice_one = &full_code[0..5];
139139+ let slice_two = &full_code[5..10];
141140 format!("{slice_one}-{slice_two}")
142141}
143142···334333 let email_body = state
335334 .template_engine
336335 .render("two_factor_code.hbs", email_data)?;
336336+ let email_subject = env::var("GATEKEEPER_TWO_FACTOR_EMAIL_SUBJECT")
337337+ .unwrap_or("Sign in to Bluesky".to_string());
337338338339 let email_message = Message::builder()
339340 //TODO prob get the proper type in the state
340341 .from(state.mailer_from.parse()?)
341342 .to(email.parse()?)
342342- .subject("Sign in to Bluesky")
343343+ .subject(email_subject)
343344 .multipart(
344345 MultiPart::alternative() // This is composed of two parts.
345346 .singlepart(
-1
src/xrpc/com_atproto_server.rs
···8787 )
8888 }
8989 AuthResult::ProxyThrough => {
9090- log::info!("Proxying through");
9190 //No 2FA or already passed
9291 let uri = format!(
9392 "{}{}",