CERN Accelerating science

Redirect non-authenticated users to SSO page


We are creating a Drupal 8 website where some sub-pages are only accessible to authenticated users. These sub-pages are accessible from links on other pages. However, we would like to avoid that users, which are not logged in, get the “access denied” page when they click on the link, but they should rather be redirected to the SSO page. Is this possible?


Hi Anton,

You can create a basic page with the thellowing message:

“In order to access the content of this page you need to login first.”

Then hyperlink the login with this URL /user/login

Then go to Configuration->Basic site settings and put the page that you have created as the new Access denied page under Default 403 (access denied) page.