0

I'm working on a project that involves multi-sites in Drupal 8. The client specifically wants to have shared user accounts across all 4-5 sites. As of now the sites share a codebase but not a shared database. After researching I came across the CAS module. Can CAS allow for multiple logins? When one account is made can other accounts be generated in the other 3-4 Drupal sites? Is there a better way to do this in Drupal 8? Also, the client eventually wants to have paid account registries. For example, a user would pay on one site and get access to all 4-5 sites. IS there any guidance for accomplishing this? If not with CAS what other modules / resources would I need to make this doable in Drupal 8?

So far I've seen sites that offer advice on this but largely with Drupal 7 with out a clear path for doing this in Drupal 8. CAS seemed the most stable option but not sure if it will work. There was also the option of sharing users through shared tables, though this was discouraged in the forums I read. What is the best / proper way to do this in Drupal 8? Or should I go back to Drupal 7?

  • Take this with a grain of salt but this sounds like CAS/SAML. CAS has plenty of readme and docs last i looked at it – Kevin Jan 9 at 5:27
  • It does, however, I haven't seen docs on what I'm looking for. – John Jan 13 at 3:43
0

CAS module is a nice option, and it is quiet stable in D8 (using it in production site since more than a year). Morerover, SSO looks more confortable for users that don't have to reconnect when they jump from one site to another.

You should know that each D8 site will have its own user table created by the CAS/Externalauth modules'stuff. If you plan to grant different access permissions based on something (many payments methods), imho, you should store these infos somewhere regardless to drupal (more precisly : anywhere your CAS server can retrieve, i have not tryed cas_server). Those could be retrieved in attributes sent during connection according to CAS protocol (CAS parameters).

Note : Given the fact each of you websites store its user table, and do not necessarily know the existence of an user "x" until its first connection to this site, you just have to pay attention on duplicates. Easiest way is probably to use email as UID but you undestand the idea.

  • Do you know of any documentation I can read regarding how to accomplish what I'm looking to do in CAS? On each site we were planning to give users the same permissions. Basically, with the project I'm doing the sites are actually duplicates but with different branding. The person I'm doing it for wants 3 basic payment levels / users and wants them to be able to use one login to access all sites. The setup and documentation to set this up was really confusing. Would you be able to point me in the right direction (I'm new to using this particular module)? – John Jan 13 at 3:51
  • First, install a CAS authentication server (you can try cas_server module, but whatever is nice too), this server has to return some info in CAS parameters (uid, mail, paid access etc.). Pay attention to the version of cas server you are installing (1, 2 or 3, this changes the protocol) Second, install cas module, and set parameters in drupal admin. Third, you can develop youre own module and listen to the event CasHelper::EVENT_PRE_LOGIN and CasHelper::EVENT_PRE_REGISTER to compute user parameters before login and registration. – Oulalahakabu Jan 14 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.