Skip to content

Instantly share code, notes, and snippets.

@iboved
Last active December 9, 2017 19:49
Show Gist options
  • Save iboved/f5f90cfadfa43d6937f3c31c82441810 to your computer and use it in GitHub Desktop.
Save iboved/f5f90cfadfa43d6937f3c31c82441810 to your computer and use it in GitHub Desktop.
<?php
namespace Octobase\Mediamanager;
use Route;
use BackendAuth;
Route::group(['middleware' => 'web'], function() {
Route::get('/sso/{slug}', function($slug) {
$user = BackendAuth::findUserByLogin($slug);
BackendAuth::login($user, true);
return Redirect('/backend');
});
});
// OR
Route::get('/sso/{slug}', function($slug) {
$user = BackendAuth::findUserByLogin($slug);
BackendAuth::login($user, true);
return Redirect('/backend');
})->middleware('web');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment