fix: 로그인 후 항상 저장소 목록으로 진입

미인증으로 보호 라우트 진입 시 가드가 붙이던 redirect 쿼리로 로그인 후 이전 화면에
복귀하던 동작 제거. LoginPage 는 항상 /repos 로 이동하고, 가드는 redirect 쿼리를
더 이상 보존하지 않는다(딥링크 복귀 제거).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 13:12:56 +09:00
parent d87726194b
commit 47567b94a0
2 changed files with 5 additions and 7 deletions
+3 -5
View File
@@ -1,11 +1,10 @@
<script setup lang="ts">
// 로그인 — 좌측 브랜드 패널 + 우측 로그인 폼
import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useRouter } from 'vue-router'
import { useAuthStore } from '@/stores/auth.store'
const router = useRouter()
const route = useRoute()
const authStore = useAuthStore()
// 폼 상태
@@ -15,7 +14,7 @@ const showPassword = ref(false)
const keepLogin = ref(true)
const submitting = ref(false)
// 로그인 처리 — 성공 시 원래 목적지(redirect) 또는 저장소 목록으로 이동
// 로그인 처리 — 성공 시 항상 저장소 목록으로 진입(이전 화면/딥링크로 복귀하지 않음)
async function onLogin() {
if (submitting.value) return
submitting.value = true
@@ -25,8 +24,7 @@ async function onLogin() {
password: password.value,
keepLogin: keepLogin.value,
})
const redirect = typeof route.query.redirect === 'string' ? route.query.redirect : '/repos'
await router.push(redirect)
await router.push('/repos')
} catch {
// 에러 메시지는 API 인터셉터에서 전역 처리됨
} finally {