How to set up a private area of a website in Drupal 8?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SamuelCLCAUS
    New Member
    • Oct 2019
    • 1

    How to set up a private area of a website in Drupal 8?

    Here's what I need;
    - A set of pages on the public facing website that are password protected (ie: not someone logging into the Drupal 8 backend admin area)
    - I need a login page with just a password box
    - I need public users to be able to enter the password and access the entire private section (we're calling it the members portal)
    - I need those users to be able to access all the pages in the members portal by entering the password only once

    Here's what I've currently got;
    - A website that was half built when I started working at the organisation (It's a Drupal 8 website)
    - A login page with just a password box
    - A set of pages that are in the members portal (not book pages)
    - A website with two menus (one that is active when a public user first lands on the website and one that is active after the password is entered)
    - A module called Protected Pages that is currently making the users have to login every time they click on a link in the menu in the members portal

    How do I set up this private section so that public users can just enter the password once and get access to all the pages in the members portal?
  • bradr2
    New Member
    • Dec 2025
    • 1

    #2
    Originally posted by SamuelCLCAUS
    Here's what I need;
    - A set of pages on the public facing website that are password protected (ie: not someone logging into the Drupal 8 backend admin area)
    - I need a login page with just a password box
    - I need public users to be able to enter the password and access the entire private section (we're calling it the members portal)
    - I need those users to be able to access all the pages in the members portal by entering the password only once

    Here's what I've currently got;
    - A website that was half built when I started working at the organisation (It's a Drupal 8 website)
    - A login page with just a password box
    - A set of pages that are in the members portal (not book pages)
    - A website with two menus (one that is active when a public user first lands on the website and one that is active after the password is entered)
    - A module called Protected Pages that is currently making the users have to login every time they click on a link in the menu in the members portal

    How do I set up this private section so that public users can just enter the password once and get access to all the pages in the members portal?
    To set up the private section so that public users only need to enter the password once to access all the pages in the members portal, you can make use of session-based authentication or cookie-based access. Here’s how you can approach it:

    First, ensure that the "Protected Pages" module or feature you’re using has an option to retain the authentication session after the password is entered. This often involves enabling a setting to keep the session alive, typically until the browser is closed or a set timeout expires.

    If such settings are not available, you may need to implement a solution that uses cookies to store the authentication status. When a user enters the password, a cookie is written to their browser indicating they are authenticated. Once the cookie is set, subsequent navigation within the members portal will check the cookie rather than prompting for the password again.

    Double-check the configuration of your current setup or module to see if it supports this functionality. It’s also a good idea to test how the site behaves across different browsers and devices to ensure seamless access after the password is entered. This should provide a smoother experience for your users!
    zz0.68w4cymhwjl zz

    Comment

    Working...