E
E
egorkozelskij2020-08-10 12:03:51
User identification
egorkozelskij, 2020-08-10 12:03:51

How to make Laravel Multiple auth with subdomains?

Hello!

Is it possible to make completely independent sessions with different user authorization tables in Laravel for SubDomains?

That is, on the main domain - a classic, and on all subdomains, registration, authorization, etc. go to another table and sessions between subdomains do not intersect. Separation of users in a secondary table by different domains, for example, through a column - 'domain'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2020-08-10
@egorkozelskij

Make the user model have a global scope for the current domain (well, or for the list)
https://laravel.com/docs/7.x/eloquent#query-scopes

S
Sanes, 2020-08-10
@Sanes

That is, on the main domain - a classic

Classic, check user rights for a domain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question