Verify authentication tokens in your application
// Tokens are automatically stored in localStorage - authiqa_token // Main authentication token - authiqa_token_expiration // Token expiration timestamp - userId // User's unique identifier
// Check if token exists const token = localStorage.getItem('authiqa_token'); if (!token) { // Redirect to login window.location.href = '/login'; }
// For child accounts, also verify parent relationship const token = localStorage.getItem('authiqa_token'); const parentSecret = localStorage.getItem('authiqa_parent_jwt_secret'); if (!token || !parentSecret) { // Redirect to login window.location.href = '/login'; }
TOKEN_EXPIRED
INVALID_TOKEN
PARENT_MISMATCH