From b61d5b4475b40ad61f2c991a4b007a33a62c1c2a Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Fri, 14 Jun 2024 09:26:01 +0200 Subject: [PATCH] Add SSO redirect option for login page Signed-off-by: Bart van der Braak --- docs/config.md | 6 ++++-- src/vector/app.tsx | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/config.md b/docs/config.md index 1f6bbabd20f..9e11b7599b4 100644 --- a/docs/config.md +++ b/docs/config.md @@ -250,12 +250,14 @@ When Element is deployed alongside a homeserver with SSO-only login, some option user can be sent to in order to log them out of that system too, making logout symmetric between Element and the SSO system. 2. `sso_redirect_options`: Options to define how to handle unauthenticated users. If the object contains `"immediate": true`, then all unauthenticated users will be automatically redirected to the SSO system to start their login. If instead you'd only like to - have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. As an example: + have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. Additionally, there is an option to + redirect anyone landing on the login page, by using `"on_login_page": true`. As an example: ```json { "sso_redirect_options": { "immediate": false, - "on_welcome_page": true + "on_welcome_page": true, + "on_login_page": true } } ``` diff --git a/src/vector/app.tsx b/src/vector/app.tsx index afcb58d931f..7c82e4a91a0 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -89,9 +89,14 @@ export async function loadApp(fragParams: {}, matrixChatRef: React.Ref