mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
fix(web):remove token callback handling
This commit is contained in:
parent
9fedd0a81f
commit
c8ac7d3fa6
4 changed files with 24 additions and 94 deletions
22
surfsense_web/components/providers/AuthCutoverPurge.tsx
Normal file
22
surfsense_web/components/providers/AuthCutoverPurge.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
|
||||
const CUTOVER_FLAG_KEY = "surfsense_auth_cutover_v1_complete";
|
||||
const LEGACY_BEARER_TOKEN_KEY = "surfsense_bearer_token";
|
||||
const LEGACY_REFRESH_TOKEN_KEY = "surfsense_refresh_token";
|
||||
|
||||
export function AuthCutoverPurge() {
|
||||
useEffect(() => {
|
||||
try {
|
||||
if (localStorage.getItem(CUTOVER_FLAG_KEY) === "true") return;
|
||||
localStorage.removeItem(LEGACY_BEARER_TOKEN_KEY);
|
||||
localStorage.removeItem(LEGACY_REFRESH_TOKEN_KEY);
|
||||
localStorage.setItem(CUTOVER_FLAG_KEY, "true");
|
||||
} catch {
|
||||
// Storage can be unavailable in private mode; cookie auth still works.
|
||||
}
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue