fix: Add server-side QR code generation for mobile app linking
- Add /qr/<uuid> endpoint to generate QR code images server-side
- Replace client-side JavaScript QR generation with reliable server-side PNG generation
- Add qrcode and Pillow dependencies to requirements.txt
- Remove JavaScript QR code library dependency
- QR codes now display reliably in all browsers
The QR code authentication flow now works properly:
1. User clicks 'Link Mobile App' → Server generates UUID and QR code image
2. QR code displays immediately (no JavaScript dependency)
3. Mobile app scans QR code → Extracts URL with UUID
4. POST to /mobileapp?uuid={uuid} → Receives API token
5. Automatic authentication and app access
Fixes the issue where QR codes weren't displaying due to JavaScript library loading problems.
Showing
| ... | ... | @@ -9,4 +9,6 @@ pyinstaller>=5.0.0 |
| PyMySQL>=1.0.0 | ||
| redis>=4.0.0 | ||
| websockets>=12.0.0 | ||
| cryptography>=42.0.0 | ||
| \ No newline at end of file | ||
| cryptography>=42.0.0 | ||
| qrcode>=7.0.0 | ||
| Pillow>=9.0.0 | ||
| \ No newline at end of file |
Please
register
or
sign in
to comment