Sentinel::Check from Subdomain (Nodejs)
i've got following issue:
my website is divided into Mainpages www.example.com (PHP-Laravel) and chat-application www.sub.example.com (with subdomain written in nodejs).
For authentication im using JWT and dotnev(connect to laravel .env file).
within my TokenController:
public function token(\Tymon\JWTAuth\JWTAuth $auth) {
if (!Sentinel::check())
{
return response()->json(['error' => 'not_logged_in'], 401);
}
...
}
When I'm login with Chrome on my Desktop-PC everything works fine and he goes further then the if-statement so in IE-11 and even on Safari (MacOs ElCapitan) its working absolulty with out problems, but if I login with Opera or with Chrome on my Android device I run in the error 401 not_logged_in. Any idea what im doing wrong, or what I'm missing? :)
More information: If I'm loggedin (doesn't matter which browser) and I'm doing: www.example.com\token (laravel route to token, i'll get the token :) My server is running with nginx/reverse-proxy.
I used this tutorial to understand the exchange between laravel and nodejs. Thank you very much for any help/ideas. :)
Sorry, but it's preferable for you to ask this on for example the Laravel forums or maybe Stack Overflow as this is a bit out our scope.