A
A
Alexander2017-06-21 23:23:05
MySQL
Alexander, 2017-06-21 23:23:05

How to combine authorization on multiple domains?

We are doing a project. In the future, we plan to launch more related projects on other domains.
The task is to make it so that the user just needs to register on any of them. And on this access could become authorized on all others.
Like Yandex, for example. You register in any of the services - the account works in all.
How to competently design a database for this task?
We see options:
1. The base for all projects is one. The option is undesirable, it would be necessary to share access. And the question of performance, nothing that there will be many tables in one database?
2. We take out the table of users in a separate database. The remaining tables for each project are in their own separate databases. In this option, it is not clear how to make selections and whether it is possible at all, because the rest of the tables of other databases are connected with the user table.
MySQL base.
How to solve this problem competently?
Perhaps there are links where you can read more about this. Thanks in advance for your advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ighor July, 2017-06-22
@alexperec

domain A - authorization domain, base one
domain B - site
domain C - another site the
user enters domain B, let him register or authorize
1) domain B generates a token or session, transfers it in a parameter to domain A
2) domain A shows a dialog , passes authorization or registration
3) domain A generates a random temporary token, passes it as a parameter to domain B, together with the parameters received from 1.
4) domain B receives authorization Cookies for a temporary token and the token is deleted

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question