12 lines
975 B
Plaintext
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).
|