mercredi 19 avril 2017

Laravel: Sharing Auth::check()?

I have heard of sharing sessions across subdomains in Laravel but I am not sure if I have to share sessions, or I can just share the authentication? I have a main site, lets call it example.com.

I then have 2 other sites, one is api.example.com and another is admin.example.com. How would I share the Auth from example.com with api.example.com and admin.example.com?

This means I can check API calls based on the callers Auth on the main site, and I don't have to sign in to multiple sites to use my admin site.

What I am asking is, can I share auth between subdomains? If so, how? If not, what are my other options, and how do I go about doing then?




Aucun commentaire:

Enregistrer un commentaire