revoke auth session on launcher logout

This commit is contained in:
2026-07-06 09:30:24 +09:00
parent b2ac08b7e0
commit a0b0e3cfb8
6 changed files with 18 additions and 41 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "autonomy-studio-launcher", "name": "autonomy-studio-launcher",
"version": "1.0.0", "version": "1.0.12",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "autonomy-studio-launcher", "name": "autonomy-studio-launcher",
"version": "1.0.0", "version": "1.0.12",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@electron-toolkit/preload": "^3.0.1", "@electron-toolkit/preload": "^3.0.1",
+4 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "autonomy-studio-launcher", "name": "autonomy-studio-launcher",
"version": "1.0.10", "version": "1.0.11",
"description": "Autonomy Studio v2 Frontend", "description": "Autonomy Studio v2 Frontend",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": { "author": {
@@ -31,7 +31,9 @@
"output": "dist" "output": "dist"
}, },
"linux": { "linux": {
"target": ["deb"], "target": [
"deb"
],
"icon": "resources/icons", "icon": "resources/icons",
"category": "Development" "category": "Development"
}, },
+5
View File
@@ -32,6 +32,11 @@ function App(): React.JSX.Element {
}, []) }, [])
const handleLogout = useCallback((): void => { const handleLogout = useCallback((): void => {
void fetch(`${LAUNCHER_API_BASE_URL}/api/auth/logout`, {
method: 'POST',
credentials: 'include',
keepalive: true,
}).catch(() => undefined)
window.launcherTailscale?.logout().catch(() => undefined) window.launcherTailscale?.logout().catch(() => undefined)
window.localStorage.removeItem(AUTH_SESSION_KEY) window.localStorage.removeItem(AUTH_SESSION_KEY)
window.sessionStorage.removeItem(AUTH_SESSION_KEY) window.sessionStorage.removeItem(AUTH_SESSION_KEY)
+1 -13
View File
@@ -619,16 +619,6 @@ body,
} }
.login-version-wrap { .login-version-wrap {
position: absolute;
right: 24px;
bottom: 16px;
z-index: 5;
display: flex;
align-items: center;
gap: 10px;
}
.launcher-version-wrap {
position: absolute; position: absolute;
left: 24px; left: 24px;
bottom: 16px; bottom: 16px;
@@ -645,7 +635,7 @@ body,
z-index: 5; z-index: 5;
display: flex; display: flex;
align-items: center; align-items: center;
max-width: min(360px, 42vw); max-width: min(180px, 28vw);
} }
.app-version-wrap .version-label { .app-version-wrap .version-label {
@@ -657,8 +647,6 @@ body,
.launcher-update-text { .launcher-update-text {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
position: relative;
top: -2px;
height: 16px; height: 16px;
padding: 0; padding: 0;
border: 0; border: 0;
+1 -2
View File
@@ -326,8 +326,7 @@ function Sidebar({ apps, userName, userEmail, userRole, userCreatedAt, userLastL
</span> </span>
</> </>
)} )}
</div> </div> </div>
</div>
{modal === 'profile' && ( {modal === 'profile' && (
<ProfileModal <ProfileModal
+5 -22
View File
@@ -110,7 +110,6 @@ function Dashboard({ authSession, onSessionUpdate, onLogout }: DashboardProps):
const activeAppVersion = activeApp const activeAppVersion = activeApp
? activeLocalVersion ?? appStatus?.localVersion ?? appStatus?.latestVersion ?? null ? activeLocalVersion ?? appStatus?.localVersion ?? appStatus?.latestVersion ?? null
: null : null
const refreshSession = useCallback(async (): Promise<AuthSession | null> => { const refreshSession = useCallback(async (): Promise<AuthSession | null> => {
const response = await fetch(`${LAUNCHER_API_BASE_URL}/api/auth/refresh`, { const response = await fetch(`${LAUNCHER_API_BASE_URL}/api/auth/refresh`, {
method: 'POST', method: 'POST',
@@ -739,28 +738,12 @@ function Dashboard({ authSession, onSessionUpdate, onLogout }: DashboardProps):
</div> </div>
)} )}
{!showManual && ( {!showManual && activeAppVersion && (
<> <div className="app-version-wrap">
<div className="launcher-version-wrap"> <div className="version-label">v{activeAppVersion}</div>
{launcherUpdateAvailable && ( </div>
<button
type="button"
className="launcher-update-text"
onClick={() => handleUpdate('launcher', launcherStatus.latestVersion, launcherStatus.downloadUrl)}
disabled={hasAnyUpdatingApp}
>
업데이트
</button>
)}
<div className="version-label">Launcher v{localVersions.launcher ?? version}</div>
</div>
{activeAppVersion && (
<div className="app-version-wrap">
<div className="version-label">{appConfig?.displayName ?? activeApp} v{activeAppVersion}</div>
</div>
)}
</>
)} )}
</main> </main>
</div> </div>
</div> </div>