fix: S06.6 guard window.isSecureContext in Login.svelte (SSR-safe) / S06.7 remove legacy localStorage refresh token
This commit is contained in:
@@ -8,7 +8,14 @@
|
||||
let error = $state("");
|
||||
let loading = $state(false);
|
||||
let require2FA = $state(false);
|
||||
let showPasswordForm = $state(!window.isSecureContext);
|
||||
let showPasswordForm = $state(true);
|
||||
let _isBrowser = $state(typeof window !== "undefined");
|
||||
$effect(() => {
|
||||
if (_isBrowser) {
|
||||
showPasswordForm = !window.isSecureContext;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function base64urlToBuffer(b64) {
|
||||
const s = b64.replace(/-/g, '+').replace(/_/g, '/');
|
||||
|
||||
Reference in New Issue
Block a user