2017 © Pedro Peláez
 

silverstripe-module subsites-multilogin

Allow a single login process to propogate across multiple Subsite Domains.

image

rookie-me/subsites-multilogin

Allow a single login process to propogate across multiple Subsite Domains.

  • Tuesday, November 28, 2017
  • by tim-lar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 64 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

silverstripe-subsites-multilogin

Extension for silverstripe-subsites to allow a single login process to propogate across multiple Subsite Domains. This is accomplished by injecting a new MemberLoginForm and processing a request on each domain using existing Silverstripe database columns (TempID and AutoLoginHash). This allows a seamless transition between subsite domains even across top-level domains (i.e. not restricted to subdomains of the same site)., (*1)

Requirements

  • SilverStripe ^3.6 (may work on earlier versions - haven't tested this)
  • Subsites
  • Multiple Subsitedomains

Installation

Use composer to install this module, (*2)

composer require rookie-me/subsites-multilogin, (*3)

After a dev/build, go to the CMS > Subsites > Domains. Here you'll be able to set the LoginWith domains, and see which domains are using this domain to log in., (*4)

It's also recommended (but not required) that you alter the url_segment for the SubsiteLogin_Controller. This will require the following:, (*5)

Director:
  rules:
    'fantasticnewendpoint' : 'SubsiteLogin_Controller'

SubsiteLogin_Controller:    
  url_segment: "fantasticnewendpoint"

License

See License, (*6)

Maintainers

Notes

  • All domains should be https (generally speaking, but especially for any login functionality)
  • The logInUserAndRedirect function has been overwritten, but most of the original functionality should remain - the "Remember me" functionality may be broken
  • If a Member is already logged in on one of the domains, they are not logged out
  • This is not a single session persisting across multiple domains; it is simply mimicking a user logging in to each domain individually through redirects
  • The maximum number of redirects allowed by modern browsers is 16. On IE8, this limit is dropped to 10. See https://stackoverflow.com/a/36041063
  • I'd recommend having a "Loading" screen that stops users from clicking when the Member Login form passes validation and is attempting login - the multisite login process can take a while!
  • This should be tested thoroughly before being used on production

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique., (*7)

If the issue does look like a new bug:, (*8)

  • Create a new issue
  • Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
  • Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker., (*9)

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers. I'm always on the silverstripe-users Slack channel if you've got any ideas on how to improve this module., (*10)

TODO

  • Verify referrer on SubsiteLogin_Controller
  • Offer multiple methods of logging in
  • Better error logging/handling
  • Offer solutions that don't overwrite MemberLoginForm
  • Log (in session?) which subsitedomain was the original entry point for login

The Versions

28/11 2017

dev-master

9999999-dev

Allow a single login process to propogate across multiple Subsite Domains.

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Larsen

cms silverstripe subsites multilogin

28/11 2017

0.1.2

0.1.2.0

Allow a single login process to propogate across multiple Subsite Domains.

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Larsen

cms silverstripe subsites multilogin

28/11 2017

dev-develop

dev-develop

Allow a single login process to propogate across multiple Subsite Domains.

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Larsen

cms silverstripe subsites multilogin

30/06 2017

0.1.1

0.1.1.0

Allow a single login process to propogate across multiple Subsite Domains.

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Larsen

cms silverstripe subsites multilogin

30/06 2017

0.1.0

0.1.0.0

Allow a single login process to propogate across multiple Subsite Domains.

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Larsen

cms silverstripe subsites multilogin