You may choose to add authentication to your application, which will require users to log in before some pages are made visible. This article will explains the steps to do so. If you haven't already, familiarize yourself with our article on creating pages and adding navigation, as both will be required before you can add authentication.
Building a User Table
Before you can add authentication to your application, you will first need a place to store and lookup your user information. You can accomplish this by creating a new web form, as we've shown below, or you can upload an existing dataset of user information. Qrvey is flexible in what you can use for authentication. You may want to have something as simple as a single password or you may want to have an email address or username, with a password, for each user. In the example below, we've opted for a username and password combination.
Once you have a user table in place, you can navigate to Page Flows inside your application, then click + Add Authentication in the right side of the navigation bar.
You can then begin configuring how you'd like authentication to work. First select the web form or dataset that has your user information, followed by the fields you'd like to use for authentication. Here we're using the username and password fields from our Users form.
Next, you can select the page users will see when they logout.
Finally, you can set a number of options, including whether you'd like users to be able to sign up for your application and whether you'd like to include a Forgot Password page.
When you are happy with all of your settings, click Publish in the upper right corner of the page to return to the page flow dashboard.
Making Pages Private
Now that authentication is configured, the final step is deciding which pages will be public and which ones will require users to log in first. To set a page as private, simply select Set as Private from the dropdown menu.
You will then notice that the page's icon changes from public to private.
Once authentication is in place, your users will see a Login/Logout link appear in the right corner of the Navigation Bar. They will automatically be directed to a login page, with all of the sign up/forgot password options you selected and will be directed to the page you specified for logout.
Pages that are marked as Private will not appear in the nav bar until after users have logged in successfully.