Troubleshooting Protected Pages

Solutions for common issues with login access, user permissions, registration, SSO integration, and element display on protected pages in Knack.

Overview

When working with protected pages in Knack, you may encounter issues with login access, user permissions, registration, or SSO integration. This guide provides solutions to the most common problems and helps you diagnose and resolve access issues quickly.

Users Cannot Access Protected Pages After Logging In

Problem

Users report that they can log in successfully, but when they try to access protected pages, they receive an error message or are redirected away from the page.

Common Causes

  • Role assignment issues: The user's account is not assigned to a role that has access to the page
  • Multiple role confusion: The page is restricted to a specific role, but the user is assigned to a different role
  • Page access settings changed: Access settings were recently modified and the user no longer has permission

Solution

  1. Navigate to the Data section in the Builder.
  2. Locate your user role table (e.g., Customers, Employees, Admins).
  3. Find the user's record and verify the user exists in the correct user role table, their account status is active (not pending, suspended, or deleted), and their email address is correct.
  4. Navigate to the Pages section and click on the protected page the user is trying to access.
  5. Click the Access tab and verify the page is set to allow the user's role, or that "All logged-in users" is selected.
  6. If the user should have access but doesn't, try removing and re-adding their role assignment, having the user log out completely and log back in, or clearing the user's browser cache and cookies.
  7. Test access by logging in with the user's credentials (or a test account with the same role) to verify the issue is resolved.

Registration Is Not Working

Problem

New users cannot register for protected pages, or the registration form is not appearing when expected.

Common Causes

  • Registration is disabled: The "Can new users register" setting is set to "No"
  • Approval workflow issues: Registration is set to "Yes, pending approval" but approvals aren't being processed
  • Form configuration errors: The registration form has required fields that are causing validation errors

Solution

If registration form is not appearing:

  1. Navigate to the Pages section and click on the protected page.
  2. Click the Access tab.
  3. Verify that "Can new users register to access this page?" is set to Yes or Yes, pending approval (not "No").
  4. Click Save if you made changes.
  5. Click Preview to test the registration form.

If registration form appears but submissions fail:

  1. In the Pages panel, expand the protected page to see its child pages.
  2. Click on the Sign Up page (the registration page).
  3. Click on the registration form element.
  4. Review all form fields and verify required fields are clearly marked, field validation rules are not too restrictive, and the email and password fields are configured correctly.
  5. Test the form by submitting a test registration.
  6. Check for error messages and adjust field settings as needed.

If pending approvals aren't working:

  1. Navigate to the Data section.
  2. Select your user role table.
  3. Look for user records with pending status.
  4. Verify that your approval workflow is configured correctly (this may involve custom fields or automation).
  5. Manually approve a test user to verify the process works.

Login Process Fails or Shows Errors

Problem

Users cannot log in, receive error messages like "Invalid credentials," or the login form doesn't work as expected.

Common Causes

  • Email address mismatch: The email in the user's account doesn't match what they're entering
  • Case sensitivity: Extra spaces or case differences in the email address
  • Password issues: User forgot password or password was not set correctly
  • Browser issues: Cookies disabled, browser cache problems, or autofill conflicts

Solution

For "Invalid credentials" errors:

  1. Navigate to the Data section and select your user role table.
  2. Search for the user's record using their email address.
  3. Verify the email address is spelled correctly, there are no extra spaces before or after the email, and the email case matches what the user is entering (though Knack is typically case-insensitive for emails).
  4. If the user forgot their password, direct them to use the "Forgot Password" link on the login page, or manually reset their password in the Data section.
  5. If the user's account was recently created, verify that a password was set during account creation.

For browser-related issues:

  1. Have the user try logging in using a different browser, an incognito/private browsing window, or a different device.
  2. If login works in incognito mode, the issue is likely browser cache or cookies. Have the user clear their browser cache and cookies, disable browser extensions that might interfere with login, and check that cookies are enabled for your Knack app domain.

For autofill issues:

Have the user manually type their credentials instead of using browser autofill. If autofill is causing problems, they can disable it in their browser settings.

Google SSO Is Not Working

Problem

Users cannot log in using Google SSO, or the "Sign in with Google" button doesn't appear or doesn't work.

Common Causes

  • SSO not enabled: Google SSO was not properly configured for the protected page
  • Domain restrictions: User's Google account domain doesn't match the allowed domain
  • Google account issues: User's Google account has problems or restrictions
  • Authorization not granted: Knack was not authorized to access Google authentication

Solution

If "Sign in with Google" button doesn't appear:

  1. Navigate to the Pages section and click on the protected page.
  2. Click the Access tab.
  3. Verify that Google SSO is enabled (you should see SSO configuration options).
  4. If not enabled, click Add Google SSO and complete the setup.
  5. Click Save and test again.

If SSO button appears but login fails:

  1. Check domain restrictions in the Access tab. If restricted to a specific domain, ensure the user's Google account email matches that domain. Consider temporarily allowing "Any Google account" to test if domain restrictions are the issue.
  2. Have the user try logging out of all Google accounts and logging back in with the correct account, using a different browser or incognito mode, and checking if their Google account has any restrictions or issues.
  3. Verify that Knack has proper authorization by reviewing the SSO configuration, re-authorizing the Google SSO connection if needed, and checking Google's authentication service status in case of outages.

If users who previously used SSO can no longer log in:

  1. Check if SSO was accidentally disabled in the page settings.
  2. If SSO was intentionally disabled, users will need to use the password reset process to set up traditional email/password credentials.

Elements Show "No Records" for Logged-In Users

Problem

After logging in, users see elements (like tables or details) that display "No records found" even though they should see their own data.

Common Causes

  • Incorrect connection setup: The table displaying records is not properly connected to the user role
  • Source filter misconfiguration: The element's source filter is not set to show records connected to the logged-in user
  • Single role requirement: The page allows multiple roles, but the element requires access to be restricted to a single role

Solution

  1. Navigate to the page with the problematic element.
  2. Click on the element (table, details, form, etc.) that's showing no records.
  3. Check the element's Data Source settings. Verify that the source table is correct, check if a source filter is applied, and look for filters that reference "logged-in user."
  4. Verify the connection structure. Navigate to the Data section and click Data Model. Verify that the table containing the records is connected to the user role table.
  5. Check page access settings. If the page allows multiple user roles, you may not have the option to display records connected to the logged-in user. Consider restricting the page to a single user role if you need this functionality.
  6. If the issue persists, create a test user account, manually add test records connected to that user, log in as the test user, and verify the records appear.

Page Rules Not Working for Different Roles

Problem

Page rules that should show or hide elements based on user role are not working as expected.

Common Causes

  • Rule conditions incorrect: The rule is checking the wrong field or using the wrong condition
  • Multiple rules conflicting: Multiple rules are affecting the same element and conflicting with each other
  • Role assignment issues: Users are not assigned to the roles the rules are checking for

Solution

  1. Navigate to the page with the problematic page rules.
  2. Click on the element that should be controlled by the rule.
  3. Click the Rules tab to view all rules affecting this element.
  4. Review each rule. Verify the WHEN condition is checking the correct field (usually "logged-in user's role"). Verify the THEN action is correct (Show/Hide). Check if multiple rules are affecting the same element and potentially conflicting.
  5. Test the rule by clicking Preview, logging in with accounts from different roles, and verifying the element appears/disappears as expected.
  6. If rules still don't work, simplify the rules by removing complex conditions, test with a single simple rule first, and verify that users are actually assigned to the roles you're checking for.

Users Removed from Login Element Cause Element Corruption

Problem

After removing a user role from a login element or deleting a user role, elements on protected pages stop working or show errors.

Common Causes

This occurs when elements on protected pages rely on connections to the logged-in user, and the user role those elements depend on is removed or deleted.

Solution

Prevention (before removing roles):

  1. Before removing a user role from a login element or deleting it, review all pages protected by that login and identify any elements that display records "connected to the logged-in user."
  2. Update or remove those elements before removing the role.

Recovery (after roles are removed):

  1. Navigate to the affected pages and identify broken elements.
  2. For each broken element, delete the element and recreate it with correct settings, or update the element's data source to use a different connection or filter.
  3. If you accidentally deleted a role, recreate the role with the same name and settings and re-add users to the role.
  4. Test thoroughly with user accounts from all roles to ensure nothing else is broken.

Best Practices for Troubleshooting

Systematic Approach

When troubleshooting access issues, reproduce the issue by logging in with the affected user's credentials or a test account with the same role. Check the basics: verify the user account exists, is active, and has the correct role assignment. Review access settings at both the page level and element level. Make one change at a time and test after each change. Document the solution for future reference.

Use Test Accounts

Maintain test accounts for each user role in your app. This allows you to quickly test access issues without needing real user credentials, verify changes before they affect real users, and demonstrate functionality to stakeholders.

Check Knack Status

If multiple users are experiencing issues simultaneously, check Knack's status page for any reported outages, your app's performance and resource usage, and any recent changes you made to the app that might have caused problems.

Next Steps