[PR #3406] [MERGED] Skip intermediate login page with single provider #6193

Closed
opened 2026-02-05 10:26:34 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3406
Author: @rjmidau
Created: 5/2/2022
Status: Merged
Merged: 6/21/2022
Merged by: @ssddanbrown

Base: developmentHead: login-auto-redirect


📝 Commits (1)

  • d5ce6b6 Skip intermediate login page with single provider

📊 Changes

4 files changed (+59 additions, -3 deletions)

View changed files

📝 app/Config/auth.php (+5 -0)
📝 app/Http/Controllers/Auth/LoginController.php (+24 -3)
resources/views/auth/login-redirect.blade.php (+16 -0)
📝 tests/Auth/OidcTest.php (+14 -0)

📄 Description

Resolves #3216, #2175

When a single authentication provider is configured, it is now possible to skip the intermediate user interaction on the /login page and redirect directly to the auth provider's actual login page, saving an extra click for users.
This new behaviour is disabled by default, and can be enabled by setting the AUTH_AUTO_REDIRECT environment variable to true.

This new behaviour only works for saml2 and oidc providers, and will not work if Social Auth providers are enabled.
This new behaviour will not be honoured for /login if argument ?logout=1 is passed (which is where users are redirected to after logout when AUTH_AUTO_REDIRECT is set to true).

This also introduces an overridden logout() function so post-logout redirection can be honoured (it appears redirectAfterLogout has not been honoured in Laravel since ~5.3 - see laravel/framework#15525)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3406 **Author:** [@rjmidau](https://github.com/rjmidau) **Created:** 5/2/2022 **Status:** ✅ Merged **Merged:** 6/21/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `login-auto-redirect` --- ### 📝 Commits (1) - [`d5ce6b6`](https://github.com/BookStackApp/BookStack/commit/d5ce6b680cbf50ddfa5ede2c680f8546498052ac) Skip intermediate login page with single provider ### 📊 Changes **4 files changed** (+59 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/Config/auth.php` (+5 -0) 📝 `app/Http/Controllers/Auth/LoginController.php` (+24 -3) ➕ `resources/views/auth/login-redirect.blade.php` (+16 -0) 📝 `tests/Auth/OidcTest.php` (+14 -0) </details> ### 📄 Description Resolves #3216, #2175 When a single authentication provider is configured, it is now possible to skip the intermediate user interaction on the /login page and redirect directly to the auth provider's actual login page, saving an extra click for users. This new behaviour is disabled by default, and can be enabled by setting the AUTH_AUTO_REDIRECT environment variable to true. This new behaviour only works for saml2 and oidc providers, and will not work if Social Auth providers are enabled. This new behaviour will not be honoured for /login if argument ?logout=1 is passed (which is where users are redirected to after logout when AUTH_AUTO_REDIRECT is set to true). This also introduces an overridden logout() function so post-logout redirection can be honoured (it appears redirectAfterLogout has not been honoured in Laravel since ~5.3 - see laravel/framework#15525) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:26:34 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6193