tangled
alpha
login
or
join now
baileytownsend.dev
/
pds-gatekeeper
90
fork
atom
Microservice to bring 2FA to self hosted PDSes
90
fork
atom
overview
issues
1
pulls
3
pipelines
never got pushed to main (whoops)
baileytownsend.dev
3 weeks ago
483c4784
ca02ceff
+5
-5
1 changed file
expand all
collapse all
unified
split
src
gate.rs
+5
-5
src/gate.rs
···
38
38
redirect_url: Option<String>,
39
39
}
40
40
41
41
-
/// GET /gate - Display the captcha page
41
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
78
-
/// POST /gate - Verify captcha and redirect
78
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
137
-
"/gate?handle={}&state={}&error={}",
137
137
+
"/gate/signup?handle={}&state={}&error={}",
138
138
url_encode(¶ms.handle),
139
139
url_encode(¶ms.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
152
-
"/gate?handle={}&state={}&error={}",
152
152
+
"/gate/signup?handle={}&state={}&error={}",
153
153
url_encode(¶ms.handle),
154
154
url_encode(¶ms.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
168
-
"/gate?handle={}&state={}&error={}",
168
168
+
"/gate/signup?handle={}&state={}&error={}",
169
169
url_encode(¶ms.handle),
170
170
url_encode(¶ms.state),
171
171
url_encode("Verification failed. Please try again.")