Protected Pages Overview
Control who can access specific content in your Knack app by requiring users to log in with valid credentials before viewing protected pages.
Overview
Protected pages in Knack allow you to control who can access specific content in your application by requiring users to log in with valid credentials. When you create a protected page, Knack automatically generates a parent login page that manages access for all child pages underneath it. This hierarchical protection system ensures that sensitive content remains secure while providing a seamless user experience.
The Page Editor provides an intuitive interface for setting up page protection during the initial page creation process or adding protection to existing pages. You can configure registration settings, define user access levels, and integrate single sign-on options all within the same workflow.
Understanding Login Page Structure
When you protect a page in Knack, the system creates a hierarchical structure where the protected page is wrapped under a parent login, and all child pages are protected as well. This design ensures that users must authenticate once to access all related content within that section of your app.
The visual structure in the Pages panel clearly indicates which pages are protected through lock icons next to the page names. When you expand the page hierarchy, you can see how child pages inherit protection from their parent login pages. This inheritance model means that once a user successfully logs into a protected page, they can navigate freely among the child pages without needing to authenticate again.
For example, if you create a protected page called "My Customer Dashboard," all pages you add underneath it (such as "Add a Service Request," "My Invoices," and "My Service Requests") will automatically require the same login credentials. This approach simplifies both the setup process for builders and the user experience for your app visitors.
Common Use Cases
Protected pages are commonly used for:
- Customer Portals: Customers log in to view their orders, invoices, and support tickets
- Project Management: Project Managers access their projects and assign tasks; Employees view assigned tasks and track hours
- Employee Dashboards: Staff access internal tools, time sheets, and company resources
- Member Directories: Members access exclusive content, forums, and member-only features
- Admin Panels: Administrators manage app settings, users, and data
What You Can Do with Protected Pages
Once you've created protected pages, you can:
- Control registration: Allow open registration, require approval, or disable registration entirely
- Manage user roles: Restrict access to specific user roles or allow all authenticated users
- Configure SSO: Integrate with single sign-on providers for enterprise authentication
- Display user-specific data: Show each user only their own records or records connected to their account
- Use page rules: Show or hide specific elements based on user role or status
Next Steps
- How to Create a Login-Protected Page to set up your first protected page
- How to Configure Registration Settings to control how new users sign up
- How to Manage User Role Access to restrict pages to specific roles
Updated about 2 hours ago
