mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Skip intermediate login page with single provider
This commit is contained in:
@@ -26,6 +26,7 @@ class OidcTest extends TestCase
|
||||
|
||||
config()->set([
|
||||
'auth.method' => 'oidc',
|
||||
'auth.auto_redirect' => false,
|
||||
'auth.defaults.guard' => 'oidc',
|
||||
'oidc.name' => 'SingleSignOn-Testing',
|
||||
'oidc.display_name_claims' => ['name'],
|
||||
@@ -111,6 +112,19 @@ class OidcTest extends TestCase
|
||||
$this->assertPermissionError($resp);
|
||||
}
|
||||
|
||||
public function test_automatic_redirect_on_login()
|
||||
{
|
||||
config()->set([
|
||||
'auth.auto_redirect' => true,
|
||||
'services.google.client_id' => false,
|
||||
'services.github.client_id' => false,
|
||||
]);
|
||||
$req = $this->get('/login');
|
||||
$req->assertSeeText('SingleSignOn-Testing');
|
||||
$req->assertElementExists('form[action$="/oidc/login"][method=POST] button');
|
||||
$req->assertElementExists('div#loginredirect-wrapper');
|
||||
}
|
||||
|
||||
public function test_login()
|
||||
{
|
||||
$req = $this->post('/oidc/login');
|
||||
|
Reference in New Issue
Block a user