세션 유지 개선

This commit is contained in:
peregr1nus
2025-12-12 16:38:03 +09:00
parent 2898f8a6cd
commit 6093947d90
2 changed files with 4 additions and 6 deletions

9
app.py
View File

@@ -66,8 +66,8 @@ def auth():
@app.route('/logout') @app.route('/logout')
def logout(): def logout():
"""로그아웃""" """로그아웃 - 세션 전체 삭제"""
session.pop('authenticated', None) session.clear()
return redirect(url_for('auth')) return redirect(url_for('auth'))
@app.route('/') @app.route('/')
@@ -241,10 +241,7 @@ def step5():
except Exception as e: except Exception as e:
logger.warning("로컬 파일 삭제 실패: %s", str(e)) logger.warning("로컬 파일 삭제 실패: %s", str(e))
# 세션 삭제 (문서 생성 및 업로드 완료) # 세션은 complete 페이지에서 로그아웃 시 삭제
session.clear()
logger.info("세션 삭제 완료")
return jsonify({ return jsonify({
'success': True, 'success': True,
'message': '제출이 완료되었습니다. 구글 드라이브에 업로드되었습니다.', 'message': '제출이 완료되었습니다. 구글 드라이브에 업로드되었습니다.',

View File

@@ -9,6 +9,7 @@
<p>담당 니고데모(상담사) 검토 후 연락드리겠습니다.</p> <p>담당 니고데모(상담사) 검토 후 연락드리겠습니다.</p>
<div class="form-actions"> <div class="form-actions">
<button type="button" class="btn btn-secondary" onclick="window.location.href='/logout'">로그아웃</button>
<button type="button" class="btn btn-primary" onclick="window.location.href='/'">처음으로</button> <button type="button" class="btn btn-primary" onclick="window.location.href='/'">처음으로</button>
</div> </div>
</div> </div>