Test Auth Protection
In this section, you'll test your application to verify that your authentication checks are configured correctly.
Tests not working?Stuck? Contact us — our development team will work directly with you to get unblocked.
Let's verify that your newly added view protections are working exactly as intended. Execute these quick validation checks to ensure your application secures your endpoints correctly:
Test 1: Verify Protected Views Block Unauthenticated Access
Perform these exact steps to confirm that your redirect logic is working properly:
- First, ensure that your user does not have an active session. Enter the URL of your Logout Endpoint (for example, http://localhost:8000/auth/logout) into your browser's address bar and press Enter to initiate the logout flow.
- Once your user has been logged out, attempt to access one of your application's protected pages by entering its URL into your browser's address bar and pressing Enter.
- If your authentication checks are working correctly, you're redirected to the Wristband login page.
Test 2: Verify Authenticated Users Can Access Protected Views
Follow these steps to confirm that authenticated users can successfully access your secured views:
- First, authenticate the user by navigating to your Login Endpoint (for example, http://localhost:8000/auth/login) and completing the login flow.
- Follow the prompts to enter your credentials and complete the authentication flow.
- After authenticating, Wristband redirects you back to your application. Confirm that you can successfully access any protected pages.
If the above tests pass, your authentication checks are working correctly.
Updated 5 days ago
What’s Next
Congratulations! Your application now properly enforces user authentication. But there’s still plenty more you can do with our platform - let’s explore!