Same login on two different Laravel projects on same server -
i want create 2 portals on same server , diferent subdomain:
app1.domain.com
app2.domain.com
i want separate in 2 different laravel projects, when authenticated in 1 of portals in other portal should authenticated.
how can that? suggestions helpful
i think looking sso
for laravel in quick search found packages
jasny/sso 1 of them, explained :
how works when using sso, when can distinguish 3 parties:
- client - browser of visitor
- broker - website visited
- server - place holds user info , credentials
the broker has id , secret. these know both broker , server.
when client visits broker, creates random token, stored in cookie. broker send client server, passing along broker's id , token. server creates hash using broker id, broker secret , token. hash used create link users session. when link created server redirects client broker.
the broker can create same link hash using token (from cookie), broker id , broker secret. when doing requests, passes has session id.
the server notice session id link , use linked session. such, broker , client using same session. when broker joins in, use same session.
hth!
Comments
Post a Comment