Y
Y
yamen2019-t2018-03-17 10:54:28
API
yamen2019-t, 2018-03-17 10:54:28

Laravel SSO single user authentication?

Tell me how you can implement a single entry point on Laravel.
The situation is as follows:
There are two projects on Laravel, and so I want to separate the authentication server (where the user tables are stored).
If I am authorized on the first site, I am immediately authorized on the second site as well.
How it is implemented within Laravel.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pushkarev, 2018-03-17
@yamen2019-t

1) You need the same APP_KEY
2) Write the session to the database
3) Use one database for the connection.
4) Session key should also be the same

I
Ilya Chubarov, 2019-11-22
@agoalofalife

There are several options
- First , you create a central authentication server, where you give your clients a token, now you can implement auth through your CA in any site and the user can log in with one login and password. In particular, on Laravel you will need to create a custom auth
- Second - if you need the user to log in immediately, then on the n1 site you can give the cookie to the client, on the n2 site you can receive these cookies and check them on the n1 site. In particular, this is easy to do through middleware

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question