• Development

    Using Drupal 8 Persistent Login Module on Platform.sh

    The Persistent Login module relies an extra cookie to maintain a Drupal user’s session. The configuration screen for this module lets you specify a prefix for the cookie. The default is “PL”. If you are using the site on HTTPS, the module prepends an “S” to the cookie it creates. Here’s an example cookie name: SPLfa0650d6d985433d455a3b15cc70fd9b .
    Platform.sh lets you configure cookie cache settings via routes.yaml .
    If you’re using Persistent Login you must tell the system not to ignore this cookie.
    Here’s a standard (and simple) routes.yaml  file on a Drupal 8 site:
    Here’s a modified version which allows Persistent Login to work correctly:

     

    There is a bit more discussion around how these cookies are handled here: https://www.drupal.org/node/2898065/discuss