Files
DFJ/tasks/task_004.txt
2025-12-16 08:57:19 +08:00

12 lines
975 B
Plaintext

# Task ID: 4
# Title: User Authentication (WeChat Login & Guest Mode)
# Status: pending
# Dependencies: 1, 2, 3
# Priority: high
# Description: Implement the user authentication system, including WeChat authorization for quick login and a guest experience mode. This involves both frontend UI for login and backend API for user session management.
# Details:
Frontend: Implement WeChat login button, handle authorization callback. Backend: Create API endpoints for WeChat login (code exchange for openid), user registration/login. Implement JWT token generation for session management. For guest mode, generate a temporary local ID and store basic data in local storage. Add a mechanism for guest accounts to bind to WeChat later.
# Test Strategy:
Test WeChat login flow: successful login, token generation, and user data retrieval. Test guest mode: start as guest, verify local data storage, and conversion to full account. Verify API security (e.g., unauthorized access).