Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 92946b2

Browse files
testing: acs accept GET to redirect when CF Access redirects back
1 parent b2a7f6b commit 92946b2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Controllers/OneloginController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ public function login(Request $request)
7070

7171
public function acs(Request $request, AuthManager $auth)
7272
{
73+
if ($request->isMethod('GET')) {
74+
return redirect(
75+
$this->oneLogin->login($this->getRedirectUrl($request), [], false, false, true)
76+
);
77+
}
78+
7379
try {
7480
$this->oneLogin->processResponse();
7581
$error = $this->oneLogin->getLastErrorReason();

src/OneloginServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function boot(AuthManager $auth, Router $router)
3030
$router->get('/login', 'OneloginController@login')->name('login');
3131
// @todo implement SSO
3232
// $router->get('/logout', 'OneloginController@logout')->name('logout');
33-
$router->post('/acs', 'OneloginController@acs')->name('acs');
33+
$router->match(['get', 'post'], '/acs', 'OneloginController@acs')->name('acs');
3434
});
3535

3636
if (config('onelogin.routing.root_routes.enable')) {

0 commit comments

Comments
 (0)