1
0
This repository has been archived on 2021-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ttv-streamkit/app/Http/Middleware/Authenticate.php
2020-04-29 23:58:18 +02:00

22 lines
482 B
PHP

<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route("oauth.twitch.login");
}
}
}