element-hq / hydrogen-web

Lightweight matrix client with legacy and mobile browser support
Apache License 2.0
650 stars 127 forks source link

Add SSO redirect options (like Element Web) #1120

Open menturion opened 1 year ago

menturion commented 1 year ago

Add support for configuring redirection of unauthenticated users to the SSO login page like it is done in Element Web (see https://github.com/vector-im/element-web/blob/develop/docs/config.md):

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.

{
    "sso_redirect_options": {
        "immediate": true,
        "on_welcome_page": true
    }
}