Mar 27, 2022
0
Level 9
Inertia redirect to external SSO login service for protected routes
Hello,
I have this issue in my inertia app when guests trying to access protected routes and laravel redirects them but I get CORS issue. how to fix that
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|Redirect
*/
protected function redirectTo($request)
{
return "https://externalssoservice.com?someparams";
}
}
Please or to participate in this conversation.