QueryLab uses email-based authentication with verification codes for secure access to AI features.
Authentication is required for:
- AI-powered SQL generation
- SQL error fixing
- Query suggestions
- Rate limiting and usage tracking
Basic SQL execution and database management work without authentication.
- Click the login button in the header
- Enter your email address (must be @ucsiuniversity.edu.my)
- Optionally enter your name
- Click "Send Verification Code"
- Check your email for a 6-digit verification code
- Enter the code in the verification modal
- Code auto-submits when all 6 digits are entered
- You're logged in upon successful verification
- Must be a @ucsiuniversity.edu.my email address
- Email verification is required
- Codes expire after 24 hours
- Verification session: 24 hours (pending verification)
- Auth token: 7 days (after successful login)
- Sessions persist across browser restarts
QueryLab uses secure, httpOnly cookies:
_auth.jti: Session ID (during verification)_auth.t: JWT authentication token (after login)
SameSite=None: For cross-origin requestsSecure=true: HTTPS only (production)HttpOnly=true: Not accessible via JavaScript (security)
- Click your profile in the header
- Select "Logout"
- Session is cleared immediately
- You'll need to log in again for AI features
- Check spam/junk folder
- Verify email address is correct
- Wait a few minutes and request a new code
- Ensure email service is working
- Request a new verification code
- Codes expire after 24 hours
- Old codes become invalid after new code is requested
If you see "SESSION_NOT_FOUND" error:
- Your verification session expired
- Request a new verification code
- Complete the login process again
If cookies aren't working:
- Ensure cookies are enabled in browser
- Check browser privacy settings
- Try a different browser
- Clear cookies and try again
- Tokens are signed and verified server-side
- Include expiration time
- Cannot be modified without invalidating signature
- Cookies cannot be accessed via JavaScript
- Prevents XSS attacks
- Only sent over HTTPS in production
- Prevents abuse of AI features
- 30 requests per minute per user
- Based on authenticated user ID
- Email addresses are only used for authentication
- No personal data is stored beyond what's needed for authentication
- All data processing happens server-side
- Cookies are only used for session management