Microservice to bring 2FA to self hosted PDSes

never got pushed to main (whoops)

+5 -5
+5 -5
src/gate.rs
··· 38 38 redirect_url: Option<String>, 39 39 } 40 40 41 - /// GET /gate - Display the captcha page 41 + /// GET /gate/signup - Display the captcha page 42 42 pub async fn get_gate( 43 43 Query(params): Query<GateQuery>, 44 44 State(state): State<AppState>, ··· 75 75 .into_response() 76 76 } 77 77 78 - /// POST /gate - Verify captcha and redirect 78 + /// POST /gate/signup - Verify captcha and redirect 79 79 pub async fn post_gate( 80 80 State(state): State<AppState>, 81 81 Query(params): Query<GateQuery>, ··· 134 134 log::error!("Failed to verify hCaptcha: {}", e); 135 135 136 136 return Redirect::to(&format!( 137 - "/gate?handle={}&state={}&error={}", 137 + "/gate/signup?handle={}&state={}&error={}", 138 138 url_encode(&params.handle), 139 139 url_encode(&params.state), 140 140 url_encode("Verification failed. Please try again.") ··· 149 149 log::error!("Failed to parse hCaptcha response: {}", e); 150 150 151 151 return Redirect::to(&format!( 152 - "/gate?handle={}&state={}&error={}", 152 + "/gate/signup?handle={}&state={}&error={}", 153 153 url_encode(&params.handle), 154 154 url_encode(&params.state), 155 155 url_encode("Verification failed. Please try again.") ··· 165 165 captcha_result.error_codes 166 166 ); 167 167 return Redirect::to(&format!( 168 - "/gate?handle={}&state={}&error={}", 168 + "/gate/signup?handle={}&state={}&error={}", 169 169 url_encode(&params.handle), 170 170 url_encode(&params.state), 171 171 url_encode("Verification failed. Please try again.")