Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Single Sign On
Single Sign On
With MPOS version 1.0.2 a few new variables were added to allow single sign on (SSO) instances of MPOS. Using these new variables in combination with a proper cookie domain allows users to switch between MPOS instances without having to login again.
How it works
The newly added variables
$config['db']['shared']['news'] control where MPOS reads the information for users, workers and news. By default, it will access the database name configured in
$config['db']['name']. If you plan to use a shared accounts database, just create a new empty database and import your accounts and coin_addresses tables to it. Then set the
$config['db']['shared']['accounts'] variable to point at the database name that has the accounts and coin_addresses table in it (coin_addresses are shared across instances but bound to the currency setting in your global config). Same works for Workers and News. Make sure you set your cookie domain properly so all sites access the same session cookie (e.g.
pool2.example.tld will use
.example.tld as the cookie domain).
Simply clone one instance for each coin you want to run and set the shared tables in every setup. They will start sharing accounts across instances automatically. If you are running into login issues, ensure the database user of that instance has read/write access to the accounts table. Accounts, workers and news may NOT be placed on an entirely different database host! Other MySQL systems like the
FEDERATED engine could be used for that (out of scope of this setup).