Sign-in goes straight to the identity provider

With single sign-on there is nothing to choose, so /authorize redirects to
it; the page shows only when something went wrong there.
Server 0.1.3, chart 0.1.4.
This commit is contained in:
Oleg Lukasonok committed 2026-11-08 19:43:07 +02:00
1 parent 1ab3d0b26a
commit 50d3d81b78
5 files changed
+12 -7

No files matched your search

+5
View File
@@ -190,6 +190,11 @@ pub async fn authorize_page(
State(state): State<AppState>,
Query(q): Query<AuthorizeQuery>,
) -> Response {
// With single sign-on there is nothing to choose: straight to the identity
// provider. The page only shows when something went wrong there.
if state.oidc.is_some() && check_authorize(&state, &q).is_ok() {
return Redirect::to(&format!("/oidc/start?{}", q.to_query_string())).into_response();
}
authorize_form(&state, &q, None).await
}