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:

  1. client - browser of visitor
  2. broker - website visited
  3. 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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -