How can I authenticate a user session on different servers?

Problem: The download link should appear on the user's home page. This download link should ONLY be available if the user is logged in.

But the real problem is that the user’s home page and download link are on separate web servers.

Is there a way to send a token with a download link and check it there?

+3
source share
3 answers
users server = serverA.com
your server  = serverB.org

If I understand correctly, the problem is that the user is only registered on server A, but not on server B, and there is no way to split the state of the session (for example, processing the session by the database)?

, :

B A
: serverA *. serverB A, .

.

* : . .

URL-, , , - , URL-. , .

+1

. , , , , , .

- , . , . , .

, - , "" "", , . , .

+1

, .

, , . .

That is, if you use sessions to log in to the user, this should be enough in the download code to start the session with session_start(), and the user must log in to the session that he already has.

0
source

Source: https://habr.com/ru/post/1711066/


All Articles