Well, at the moment I have 2 sites.
The two sites are in the same domain, so we can share cookies. But I need a simple way to check if the cookie session is really authenticated on the laravel site.
My idea is expose a method over the laravel site to call it from the other php project, something like this:
public function checkUser($cookie)
{
return Auth::check($cookie);
}
There is a simple method like Auth::check($cookie) ? or what I need to accomplish this?
Thanks!
Auth::user()
将返回登录用户或FALSE
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.