Welcome to our ultimate video guide on turning spreadsheets into apps. This video series will cover everything you need to learn to create web applications using your Excel files, from importing the file online to deploying dynamic forms and reports to your website.
One critical step you need to take after importing your data from Excel to web and before you start building the app interface is setting role-based, user authentications. This is to control overall access to sensitive information from your database when the app is launched.
The Caspio Application Platform supports varying methods of logging in to suit your requirements. Let’s begin by quickly going through these options.
When you see input fields for both username and password to access content on any given website, it means that user authentications are in place. Your goal in this tutorial is to custom build two user roles — Sales Administrators and Sales Representatives.
From the list of objects in the left-hand panel of Caspio’s app interface, click Authentications.
You’ll find in the resulting screen that your app has no authentications created. To get started, click the New Authentication link beside the plus symbol near the top.
You’ll need to select your Authentication data source next, or the table that has the username and password fields for a specific role. Click on the dropdown menu and select demo_tbl_admin to start creating your admin authentication.
For your Setup options, you have two choices. Let’s explore the Express option first by clicking its radio button. It’s the quickest and easiest way to create an authentication for your app.
This setup option pulls the username and password fields from your selected data source, and automatically generates labels, text boxes and masks password input. Note that a unique field for the Username field and a Password data type for the Password field must be set in the table design of your data source beforehand (already covered in Part 2 of the video series).
Explore the Custom option next by clicking the second radio button in Setup options. Here, users can be validated in one of four ways:
Caspio data source – This recommended option is essentially Express with more customizations.
ID Services – This option allows your users to log in using their Twitter, Google or OpenID accounts to access your app. If you decide to authenticate your users this way, set up these third-party services with Caspio first.
Caspio & ID Services – This option allows user authentication through the Caspio login form, and any of the enabled third-party providers mentioned above.
SAML Single Sign-On – This option leverages the network credentials commonly used by employees in large corporations. So instead of having separate authentications, employees can use their existing accounts to access your Caspio app. Note that this option is only available on corporate level plans.
For this tutorial, validate with a Caspio data source by clicking the first radio button. This will unlock more configuration options for your authentication form.
Under the Elements panel of the resulting window, you should be able to view your default Authentication Fields.
And in this section, you have the option to do the following configurations in the Standard tab:
But the only change you’ll need to do here is rename the Label of your Email field from User name to Email. This is to intuitively signal users on what to input when logging in.
In case you wanted to add new Authentication Fields, follow the simple steps below:
This way, before your users can log in, they must input their Name, Email and Password.
But this exercise doesn’t require users to input their Name, so go ahead and select the newly added field in your Elements panel and click “X” at the bottom. Then click Yes in the confirmation window to remove.
When you click the Advanced tab while configuring any authentication field, you’ll find more options to test and implement.
Here are the different things you can do on this screen:
More advanced settings can also be viewed when you click on Advanced Settings (Optional) below the Configure Authentication section.
The features you can configure here are as follows:
Failure Message – Click the Change link to open a small window that will allow you to edit the resulting message when authentication has failed.
Logout destination – Click the Change link to redirect users to a new webpage or DataPage within your Caspio app after logging out.
Timeout and redirection – Click the Change link to adjust the timespan when users will be logged out due to inactivity. It is also possible to redirect them to a different URL.
Login redirection on success – Click the Change link to redirect users to a new webpage or DataPage upon logging in.
Enable cross-app login – Checking this box will allow users who already have an active session with one of your apps, to access this app without logging in again.
Only one session per user – Checking this box will allow users to only have one active session.
Show login form on failure page – Checking this box will display an error message upon login failure, and loop users back to your authentication form.
Auto-focus on the first field – Checking this box will have the cursor sit on the first field upon page load.
When you’re done, click Create to save your changes.
A window will appear next, prompting you to type in the Authentication Name. Go ahead and input Demo Admin Login, then click Finish. This authentication will now be used as the login screen for all Sales Administrators to access your app.
For the login screen of your Sales Representatives, simply follow the same steps shown above. But do remember to select demo_tbl_reps when choosing the Authentication data source, and type in Demo Reps Login as the Authentication Name after clicking Create.
You’ve now completed the foundation of your app in Caspio by creating two login screens on top of the data you imported from Excel to web.
In the next video, you’ll learn how to build all the functionalities required for your application to become a minimum viable product. Expect to create charts, forms, reports and pivot tables without writing a single line of code.
Hope to see you there!