How to Create a Logout Link
Caspio Bridge offers two main methods for logging out of your apps. You can logout users automatically after a specific amount of time. This method is the easiest to implement. You can also create a logout link to provide users with more immediate control. Both methods are outlined below.
Creating a logout link
The logout link is a hyperlink that tells Caspio Bridge to discard the user’s current identity credentials. By default, the hyperlink doesn’t change your user’s browser location, however, you can customize the action that the browser will take after the user clicks a logout link.
Steps to create a logout link:
1. Copy the logout link location from the authentication wizard
Click the Authentication button and proceed to the Logout screen. “Logout” is the very last screen of the wizard. The URL for the logout link is the last item on the final page. Copy the logout link to your clipboard. Don't press finish until after the next step.
2. Customize the destination after logout
After a user clicks a logout link, by default the same web page will be reloaded with the authenticated DataPages replaced with fresh log-in forms. You can change this action to have the browser go to a specific URL, such as your homepage, or have the browser go to a specific DataPage which will be deployed directly from Caspio. After making your selection, you can press finish to save your changes.
3. Choose a location for your logout link
Open a DataPage in the Edit view. Proceed to any screen that asks you to configure your fields. Web Forms have one Configure Fields screen whereas Search and Report pages have three (search, results, and details pages). You can add a logout link into the header, footer, or an HTML block, but the footer is the most common location. Click on the Insert button and insert either Header and Footer, or an HTML block.
4. Create the logout link
Create the logout link using HTML.
Replace Logout URL with the logout link you copied from the Authentication wizard. The logout link URL must be surrounded with quotation marks. Also, replace the Link text with whatever text you’d like to be displayed. You can copy this HTML link and use it in any of your authenticated DataPages. Also, the logout link will be the same in every authenticated folder.
<a href="Logout">Link Text</a>
Logout Automatically after a certain amount of time
You can configure Caspio Bridge to automatically discard the end-user's identity credentials after a specific amount of time. Although this option is available under “Enable Advanced Features” it is actually easier to implement than a logout link. Customizing the logout time is accomplished entirely in the Authentication wizard.
Steps to configuring timed logout:
1. Enable Advanced Options
Click on the Authentication button and check Enable Advanced Options. It is the last checkbox on the first screen of the wizard. To configure a timed logout you must use the Custom Setup option. Otherwise, the "Enable Advanced Options" checkbox will be grayed out. Press the Next button and proceed to the Logout page.
2. Enable and configure timed logout
After the clicking Enable Advanced Options the middle of the screen will include options for configuring your session settings. By default users will be logged out after two hours. You can change this amount of time to several options ranging from 15 minutes to one week.