mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 02:22:21 +00:00
Fix frontend login for nextcloud flows
This commit is contained in:
15
src/app.rs
15
src/app.rs
@@ -51,6 +51,16 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
.service(web::redirect("/carddav", "/carddav")),
|
||||
);
|
||||
|
||||
if nextcloud_login_config.enabled {
|
||||
app = app.configure(|cfg| {
|
||||
configure_nextcloud_login(
|
||||
cfg,
|
||||
nextcloud_flows_state,
|
||||
auth_provider.clone(),
|
||||
frontend_config.secret_key,
|
||||
)
|
||||
});
|
||||
}
|
||||
if frontend_config.enabled {
|
||||
app = app
|
||||
.service(web::scope("/frontend").configure(|cfg| {
|
||||
@@ -64,10 +74,5 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
}))
|
||||
.service(web::redirect("/", "/frontend").see_other());
|
||||
}
|
||||
if nextcloud_login_config.enabled {
|
||||
app = app.configure(|cfg| {
|
||||
configure_nextcloud_login(cfg, nextcloud_flows_state, auth_provider.clone())
|
||||
});
|
||||
}
|
||||
app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user