Frontend user authentication

Modified on Tue, 13 May at 3:39 PM

Setting up Authentication functionality


TODO: review these notes



Read through the entire document before starting any work!


Notes:

  • The notes below are for implementing Frontend User Authentication to secure pages.
  • If you are creating a Web Engine Course installation, see the article notes for that module.
  • Assumes website has been created! If there's no existing website see create new website


Before you start

Consider how you want to add users to the system. This impacts which pages are needed and how to configure them. Examples:

  1. Users are created by an Administrator 
    • ex: A secured church area
    • There is no registration page. (bots can't register themselves)
  2. Users register themselves
    • ex: a public online course
    • Has a registration page. (bots can register)


Create the user collection

A User Collection is a group of users that can access one or more websites.

  1. Admin Area > Authentication > User collections
  2. Click on "Add user collection"
  3. Name: Provide the collection a name appropriate to the function
  4. Type: Entity or Network (usually Entity type)
  5. Entity: select which entity uses the user collection (usually current)
    • Network: (if this type) select a Network for the user collection
  6. Click on Create button
  7. The user collection will open for editing:
  8. Providers: typically click on "Add email sign in" button
    • Click on Update button
  9. Profile fields: 
  10. The user account can have multiple fields. We typically use these:
    • username:
      • Click on Add field button
      • Name: "username"
      • Label: "User Name"
      • Type: username
      • Required: (yes) set Checkmark
      • Unique: (yes) set Checkmark
      • Click on Add button
    • email:
      • Click on Add field button
      • Name: "email"
      • Label: "E-Mail"
      • Type: Email
      • Required: (yes) set Checkmark
      • Unique: (yes) set Checkmark
      • Click on Add button
  11. Profile name field: select username
  12. Click on Update button


Website pages

  • Consider the structure needed for your workflow and create the pages
  • Example structure of internal secured pages. Create these pages.
    • ... [pagetree root]
    • utility (no preset)
      • Sign-in
      • Sign-in error
      • Terms [page with terms legal text]
      • Verify Sign-in
      • User account
      • Internal [top page for secured pages]
        • ...create additional pages as needed...


Add the indicated blocks to the pages. For the pages, if you don't have a design, you can use a Basic pre-set or preset with no content, just a layout (eg: ALPS - Centered Content page).


Registration page:

  • Create page if open to public registration
  • Add Registration form block


Sign in page:

  • Add Sign-in form block
  • Set Title field
  • Set Registration link label


Sign in error page:

  • Add Sign-in error block
  • Set Title field


Verify sign in page:

  • Add Verify Sign-in block
  • Set Title field


User account page:

  1. Add "overview" & "User profile" blocks
  2. Secure page: 
    1. ! After setting up website Authentication do these steps
    2. Page settings > Advanced > Page access
    3. Require authentication: set checkmark
    4. Site user groups: No groups required


Website Authentication submodule


On the website, where you added the authentication pages, expand the menu below the website & click on "Authentication" submodule. Update the below sections.


Authentication Settings (tab)


Authentication

  • Checkmark in field "Authentication enabled"
  • Select the user collection
  • Click on Update button
  • Screen refreshes with additional fields displayed


Registration

  • Read help texts for following settings and enable if the workflow requires it
  • Registration enabled: enable = public registration page
  • Require registration: read help text
  • Require terms acceptance: requires users to accept terms, before they continue
  • Registration terms label: provide the terms label (see help texts for guidance)
  • Add terms label, terms link and terms link label as needed


User menu

  • Select the menu where you want the user's account displayed when logged in. If you have not setup menus, then you will need to come back to do this steps after menus are created.


Pages:

  • Set the following pages as needed. Depending on new user workflow, all pages may not be needed.
  • Registration page
  • Sign in page
  • Sign in error page
  • Verify sign in page
  • User account page: needs "User account overview" & "User profile" blocks
  • New user page


Authentication Groups (tab)


Create access groups to secure the website pages.

  1. Click on "Add group" button
  2. Provide name of the group. Create a group "internal"
  3. Click on "Create" button (group interface opens up)
  4. If you have users, you can add them to the group, under the Users tab.
  5. To create another group, click on Authentication submodule and then on Groups.


Website secured pages


! Return to the User Account page notes above and complete those steps.


Add authentication to the Internal webpage, to create an internal area:

  1. On the "Internal" Page > Page settings > Advanced > Page access
  2. Page access:
    • Require authentication: set Checkmark
    • Site user groups: add group(s)
    • Click on Update
  3. Lock icons will replace normal page icons for pages under authentication
  4. Secured parent page, will protect subpages
  5. Child pages can use additional groups
  6. Add access to secured pages in your menus or other navigation elements if needed.


Website navigation


Add navigation so the frontend users can get to the pages they should access.


Website Menus


It is possible to add secured pages into a website menu. When the user is logged in, the navigation links will then appear. A lock instead of a page icon in the menu means the user must be logged in to see the navigation link.


Page list block 


On pages it is possible to use the Page list block, set to the "Child pages of current page" list type. This will display the child pages the user has access to.


Create Users


Internal test user


Use Case: Website has a secured internal region, that has no registration page, administrator adds new accounts.


To test, add a internal user to the User Collection.

  1. Admin Area > Authentication > Frontend users
  2. Click on "Add user"
    1. Email: add a working email account
    2. Name: (optional)
    3. User collection: select collection to add user to
    4. Click on "Create" button
  3. User details interface opens
  4. Double-check the User Collection setting, add if missing. (bug ticket opened)
  5. Profile: User Name: provide unique user name
  6. Notify user of account: set checkmark and click on "Notify user" button, to notify the user.


Test the configuration:


Administrator created user account:

  1. Add user to the user collection groups to test their access.
    1. Website > Authentication > Groups
    2. Click on group name, then users. Click on Add user button
    3. In the popup search for the user, then add them to the group
    4. continue for each group
  2. Add any navigation needed for the test user to reach pages they should see
    1. Per "Website navigation" above:
    2. Add pages with "page access" set to a group the user belongs to
    3. Add Page list blocks to pages, to navigate internally without menus
  3. Go to the frontend of the website
  4. "Sign in" link should be visible
  5. Click on link
  6. Enter E-Mail into the Email address field and click on Sign in button 
  7. Go to the email account of the user
  8. In the email received, click on the "Confirm Sign in" button
  9. User taken to the website
  10. Depending on configuration, there may be a Terms popup to acknowledge
  11. After accepting the terms, you will be on the website
  12. You should be able to access your account
  13. Test group access to the pages, links, etc., adjust as needed.


Self-Register workflow:

  1. This workflow requires a registration page, and configuration in the Authenticate module.
  2. Needs test email account
  3. Go to website frontend
  4. Click on Register button
  5. Fill out the fields & click on Register
  6. As per the message on the next page, use the link sent in email to login
  7. Login to the Members only region
  8. Test group access to the pages, links, etc.
  9. Adjust as necessary




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article