mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 23:29:08 +03:00
* add last sign in feat * wrap only the button for email, update colors in wrapper * foreground light for wrapper text * use a Badge and move it to the right * add outline * use default colors
24 lines
678 B
TypeScript
24 lines
678 B
TypeScript
import { LOCAL_STORAGE_KEYS } from 'lib/constants'
|
|
|
|
const LOCAL_STORAGE_KEYS_ALLOWLIST = [
|
|
'graphiql:theme',
|
|
'theme',
|
|
'supabaseDarkMode',
|
|
'supabase.dashboard.auth.debug',
|
|
'supabase.dashboard.auth.navigatorLock.disabled',
|
|
LOCAL_STORAGE_KEYS.TELEMETRY_CONSENT,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_API_SIDE_PANEL,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_NAVIGATION_LAYOUT,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_RLS_AI_ASSISTANT,
|
|
LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS,
|
|
LOCAL_STORAGE_KEYS.LAST_SIGN_IN_METHOD,
|
|
]
|
|
|
|
export function clearLocalStorage() {
|
|
for (const key in localStorage) {
|
|
if (!LOCAL_STORAGE_KEYS_ALLOWLIST.includes(key)) {
|
|
localStorage.removeItem(key)
|
|
}
|
|
}
|
|
}
|