-
Notifications
You must be signed in to change notification settings - Fork 0
PR #122: ログアウト機能のUI実装 #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,18 +1,38 @@ | ||||||
| 'use client'; | ||||||
| "use client"; | ||||||
|
|
||||||
| import Link from 'next/link'; | ||||||
| import { usePathname } from 'next/navigation'; | ||||||
| import Link from "next/link"; | ||||||
| import { usePathname, useRouter } from "next/navigation"; | ||||||
| import { useState } from "react"; | ||||||
| import { logout } from "@/lib/api/auth"; | ||||||
|
|
||||||
| export function AppSidebar() { | ||||||
| const pathname = usePathname(); | ||||||
| const router = useRouter(); | ||||||
| const [isLoggingOut, setIsLoggingOut] = useState(false); | ||||||
|
|
||||||
| const handleLogout = async () => { | ||||||
| if (isLoggingOut) return; | ||||||
|
|
||||||
| setIsLoggingOut(true); | ||||||
| try { | ||||||
| await logout(); | ||||||
| router.push("/login"); | ||||||
|
||||||
| router.push("/login"); | |
| router.replace("/login"); |
Copilot
AI
Feb 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logout Button のラッパーに mt-auto を付けたことで、下の System Info Box 側にも mt-auto が残っている場合、flexの自動マージンが分散して「ログアウトボタンがSYSTEM STATUSの直上に来ない/大きな余白が入る」レイアウト崩れが起きます。どちらか片方だけに mt-auto を付けるか、2つをまとめた下部コンテナ1つに mt-auto を付けてその中で縦並びにしてください。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ログアウトの
delete_cookieでsamesite="none" if is_https else "lax"に変更されていますが、既存テストはCookieが消えること(max-age=0等)しか見ておらず、今回の修正目的である「属性一致(SameSite/Secure)により本番で確実に削除できる」ことを担保できません。FRONTEND_URLをhttpsにした場合のSet-Cookieヘッダーにsamesite=noneとsecureが出ることを追加でアサートしてください。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback