mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 22:33:01 +02:00
Compare commits
1 commit
5bf20db8e7
...
6b2770f914
Author | SHA1 | Date | |
---|---|---|---|
|
6b2770f914 |
1 changed files with 4 additions and 6 deletions
|
@ -298,9 +298,7 @@ pub(crate) async fn register_route(
|
|||
session: None,
|
||||
auth_error: None,
|
||||
};
|
||||
let skip_auth = body.appservice_info.is_some() || is_guest;
|
||||
|
||||
// Populate required UIAA flows
|
||||
let mut skip_auth = body.appservice_info.is_some();
|
||||
if services.globals.registration_token.is_some() {
|
||||
// Registration token required
|
||||
uiaainfo.flows.push(AuthFlow {
|
||||
|
@ -319,10 +317,9 @@ pub(crate) async fn register_route(
|
|||
},
|
||||
}))
|
||||
.expect("Failed to serialize recaptcha params");
|
||||
skip_auth = skip_auth || is_guest;
|
||||
}
|
||||
}
|
||||
|
||||
if uiaainfo.flows.is_empty() && !skip_auth {
|
||||
} else {
|
||||
// No registration token necessary, but clients must still go through the flow
|
||||
uiaainfo = UiaaInfo {
|
||||
flows: vec![AuthFlow { stages: vec![AuthType::Dummy] }],
|
||||
|
@ -331,6 +328,7 @@ pub(crate) async fn register_route(
|
|||
session: None,
|
||||
auth_error: None,
|
||||
};
|
||||
skip_auth = skip_auth || is_guest;
|
||||
}
|
||||
|
||||
if !skip_auth {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue