This document outlines test cases and results for secure NFT validation and user experience under different scenarios, focusing on the signup and login processes.
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
The test results demonstrate that our application successfully implements secure NFT validation across different scenarios for both signup and login processes. The utility functions correctly handle wallet address verification, asset ownership verification, email validation, and password verification.
Key findings:
Wallet-based authentication properly verifies signatures and asset ownership.
Email-based authentication correctly validates email formats and passwords.
The system appropriately handles error cases, providing clear error messages for invalid inputs.
Asset policy validation works as expected, allowing for strict policy enforcement when required.
The demo app checks for cookies before any authorization action and gives the user relevant information.
All APIs work as expected and return relevant errors.
Areas for potential improvement or additional testing:
Edge case scenarios for policy validation with multiple assets
Performance testing for asset ownership verification, especially with large numbers of assets
Security testing for potential attack vectors (e.g., replay attacks, signature spoofing)
Overall, the current implementation provides a secure and user-friendly experience for NFT-gated authentication and access control.
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Test Case | Description | Expected Result | Actual Result |
---|---|---|---|
Valid wallet signature
Signup with valid stake address, signature, key, and nonce
Successful signup with wallet details
Successful signup with wallet details
Invalid wallet signature
Signup with invalid signature
Error: Invalid wallet authentication
Error: Invalid wallet authentication
Valid asset ownership
Signup with valid asset ownership
Successful signup with asset details
Successful signup with asset details
Invalid asset ownership
Signup with asset not owned by the wallet
Error: Asset cannot be verified on-chain
Error: Asset cannot be verified on-chain
Strict policy validation (Pass)
Signup with asset matching strict auth policy
Successful signup with verified policy
Successful signup with verified policy
Strict policy validation (Fail)
Signup with asset not matching strict auth policy
Error: Invalid asset policy
Error: Invalid asset policy
Valid email and password
Signup with valid email format and password
Successful signup with email and password hash
Successful signup with email and password hash
Invalid email format
Signup with invalid email format
Error: Invalid email format
Error: Invalid email format
Invalid signup inputs
Signup with neither wallet nor email/password
Error: Invalid signup inputs
Error: Invalid signup inputs
Valid wallet signature
Login with valid stake address, signature, key, and nonce
Successful login
Successful login
Invalid wallet signature
Login with invalid signature
Error: Invalid wallet authentication
Error: Invalid wallet authentication
Mismatched wallet address
Login with wallet address not matching user data
Error: Invalid network or wallet address
Error: Invalid network or wallet address
Valid asset ownership
Login with valid asset ownership
Successful login
Successful login
Invalid asset ownership
Login with asset not owned by the wallet
Error: Asset cannot be verified on-chain
Error: Asset cannot be verified on-chain
Valid email and password
Login with correct email and password
Successful login
Successful login
Invalid email
Login with email not matching user data
Error: Invalid email or email format
Error: Invalid email or email format
Invalid password
Login with incorrect password
Error: Invalid password
Error: Invalid password
Invalid login inputs
Login with neither wallet nor email/password
Error: Invalid login inputs
Error: Invalid login inputs
Valid signature
Verify valid wallet signature
Return true
Return true
Invalid signature
Verify invalid wallet signature
Return false
Return false
Valid ownership
Verify asset owned by the wallet
Return true
Return true
Invalid ownership
Verify asset not owned by the wallet
Return false
Return false
Valid email format
Validate correct email format
Return true
Return true
Invalid email format
Validate incorrect email format
Return false
Return false
Correct password
Verify correct password against hash
Return true
Return true
Incorrect password
Verify incorrect password against hash
Return false
Return false
No auth token
Request without an auth token
Redirect to login page
Redirect to login page
Invalid auth token
Request with an invalid auth token
Redirect to login page
Redirect to login page
Valid auth token
Request with a valid auth token
Allow access to protected routes
Allow access to protected routes
Admin access
User with admin policy accessing admin routes
Allow access
Allow access
Non-admin access
User without admin policy accessing admin routes
Redirect to home page
Redirect to home page
Asset-specific access
User with correct policy accessing asset routes
Allow access
Allow access
Asset-specific denial
User without correct policy accessing asset routes
Redirect to home page
Redirect to home page
Cookie support check
First visit without cookie support check
Set cookie_support_check cookie
Set cookie_support_check cookie
Cookies required
Visit without cookie support
Redirect to cookies-required page
Redirect to cookies-required page
No auth token
Attempt to access page without auth token
Redirect to login page
Redirect to login page
Invalid policy
User with invalid policy for Asset1
Redirect to home page
Redirect to home page
Valid access
User with valid policy for Asset1
Render TokenGatedDemoPage
Render TokenGatedDemoPage
API failure
Failure in fetching policies
Throw error
Throw error
No auth token
Attempt to access page without auth token
Redirect to login page
Redirect to login page
Invalid policy
User with invalid policy for Asset2
Redirect to home page
Redirect to home page
Valid access
User with valid policy for Asset2
Render TokenGatedDemoPage
Render TokenGatedDemoPage
API failure
Failure in fetching policies
Throw error
Throw error
No auth token
Attempt to access settings without auth token
Redirect to login page
Redirect to login page
Non-admin access
Non-admin user attempting to access settings
Redirect to home page
Redirect to home page
Admin access
Admin user accessing settings
Render SettingsPage
Render SettingsPage
API failure
Failure in fetching policies
Throw error
Throw error
Render check
Component renders without crashing
Component renders successfully
Component renders successfully
Content verification
Correct title and subtitle displayed
Correct content rendered
Correct content rendered
Feature cards
Correct number and content of feature cards
Two feature cards with correct content
Two feature cards with correct content
Navigation
"Back to Home" link present and functional
Link present with correct href
Link present with correct href
Styling
Correct CSS classes applied
Classes applied as expected
Classes applied as expected