GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 로그아웃 직후 SSO 자동 시작이 되돌리지 않게 한다 · datamaker/vault@89d43f1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/frontend/src
    • components/layout
      • Layout.tsx
    • pages
      • Login.tsx
  • package.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/frontend/src/components/layout/Layout.tsx‎

Copy file name to clipboardExpand all lines: apps/frontend/src/components/layout/Layout.tsx
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ export function Layout({ children }: LayoutProps) {
9595
} catch {
9696
// ignore
9797
}
98+
// ProtectedRoute redirects to a bare /login as soon as the store flips, so
99+
// the ?local=1 below can get lost. The skip flag is what the login page
100+
// actually honours; local=1 is kept for the manual/bookmark case.
101+
sessionStorage.setItem('vault_sso_skip', '1');
98102
logout();
99-
// local=1 keeps the login page from bouncing straight back through SSO
100103
navigate('/login?local=1');
101104
};
102105

Collapse file

‎apps/frontend/src/pages/Login.tsx‎

Copy file name to clipboardExpand all lines: apps/frontend/src/pages/Login.tsx
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ export function Login() {
4646
return;
4747
}
4848
const local = new URLSearchParams(window.location.search).get('local') === '1';
49+
const skip = sessionStorage.getItem('vault_sso_skip') === '1'; // set by Logout
50+
sessionStorage.removeItem('vault_sso_skip');
4951
const bounced = Number(sessionStorage.getItem(AUTO_FLAG) ?? 0) > Date.now() - 60_000;
5052
getOidcStatus()
5153
.then(({ enabled }) => {
5254
setSsoEnabled(enabled);
53-
if (enabled && !local && !bounced) {
55+
if (enabled && !local && !skip && !bounced) {
5456
sessionStorage.setItem(AUTO_FLAG, String(Date.now()));
5557
window.location.replace('/api/v1/auth/oidc/start');
5658
}
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vault",
3-
"version": "2.1.3",
3+
"version": "2.1.4",
44
"private": true,
55
"workspaces": [
66
"packages/*",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.