This commit performs comprehensive documentation reorganization: 1. Extracted testing checklist from CLAUDE.MD to docs/standards/testing-checklist.md - Consolidated manual testing checklist - Added validation tools and resources - Created pre-release validation workflow 2. Streamlined CLAUDE.md to lightweight operational instructions - Python environment setup (uv) - Agent-developer protocol - Key documentation references - Removed redundant content (already in other docs) 3. Removed CLAUDE.MD (uppercase) - content was redundant - All content already exists in architecture/overview.md and projectplan docs - Only unique content (testing checklist) was extracted 4. Moved root documentation files to appropriate locations: - CONTAINER_IMPLEMENTATION_SUMMARY.md -> docs/reports/2025-11-19-container-implementation-summary.md - QUICKFIX-AUTH-LOOP.md -> docs/reports/2025-11-18-quickfix-auth-loop.md - TECHNOLOGY-STACK-SUMMARY.md -> docs/architecture/technology-stack-legacy.md - TODO_TEST_UPDATES.md -> docs/reports/2025-11-19-todo-test-updates.md 5. Consolidated design folders: - Moved all docs/designs/ content into docs/design/ - Renamed PHASE-5-EXECUTIVE-SUMMARY.md to phase-5-executive-summary.md (consistent naming) - Removed empty docs/designs/ directory 6. Added ADR-021: IndieAuth Provider Strategy - Documents decision to build own IndieAuth provider - Explains rationale and trade-offs Repository root now contains only: README.md, CLAUDE.md, CHANGELOG.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
1.6 KiB
Markdown
68 lines
1.6 KiB
Markdown
# QUICK FIX: Auth Redirect Loop
|
|
|
|
**Problem**: Dev login redirects back to login page (loop)
|
|
**Cause**: Cookie name collision (`session` used by both Flask and StarPunk)
|
|
**Fix**: Rename auth cookie to `starpunk_session`
|
|
**Time**: 30 minutes
|
|
|
|
## 6 Changes in 3 Files
|
|
|
|
### 1. starpunk/routes/dev_auth.py (Line 75)
|
|
```python
|
|
# Change this:
|
|
response.set_cookie("session", session_token, ...)
|
|
|
|
# To this:
|
|
response.set_cookie("starpunk_session", session_token, ...)
|
|
```
|
|
|
|
### 2. starpunk/routes/auth.py (5 changes)
|
|
|
|
**Line 47:**
|
|
```python
|
|
session_token = request.cookies.get("starpunk_session") # was "session"
|
|
```
|
|
|
|
**Line 121:**
|
|
```python
|
|
response.set_cookie("starpunk_session", session_token, ...) # was "session"
|
|
```
|
|
|
|
**Line 167:**
|
|
```python
|
|
session_token = request.cookies.get("starpunk_session") # was "session"
|
|
```
|
|
|
|
**Line 178:**
|
|
```python
|
|
response.delete_cookie("starpunk_session") # was "session"
|
|
```
|
|
|
|
### 3. starpunk/auth.py (Line 390)
|
|
```python
|
|
session_token = request.cookies.get("starpunk_session") # was "session"
|
|
```
|
|
|
|
## Test It
|
|
|
|
```bash
|
|
# Run tests
|
|
uv run pytest tests/ -v
|
|
|
|
# Start server
|
|
uv run flask run
|
|
|
|
# Browser test:
|
|
# 1. Go to http://localhost:5000/admin/
|
|
# 2. Click dev login
|
|
# 3. Should see dashboard (not login page)
|
|
# 4. Check cookies in DevTools - should see "starpunk_session"
|
|
```
|
|
|
|
## Full Docs
|
|
|
|
- Executive Summary: `/docs/design/auth-redirect-loop-executive-summary.md`
|
|
- Implementation Guide: `/docs/design/auth-redirect-loop-fix-implementation.md`
|
|
- Visual Diagrams: `/docs/design/auth-redirect-loop-diagram.md`
|
|
- Root Cause Analysis: `/docs/design/auth-redirect-loop-diagnosis.md`
|