mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: totp 2fa; httpcontext extension for jwtuser; asp.net data protection; prevent banned users from certain actions; account deletion requires 2fa if enabled; making users admins requires 2fa if enabled; httpcontext extension to get ip; enhance user store
refactor: organize dtos by domain; verification providers use verification context; move ip parsing into http context extensions chore: clean code
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import Navbar from '$lib/components/Navbar.svelte';
|
||||
import { user } from '$lib/stores/user';
|
||||
import { startTokenRefreshInterval, getToken, refreshTokenIfNeeded } from '$lib/utils/auth';
|
||||
import { parseTotpEnabled } from '$lib/utils/totp';
|
||||
import { page } from '$app/state';
|
||||
import type { LayoutData } from './$types';
|
||||
|
||||
@@ -27,7 +28,8 @@
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
user.set(await res.json());
|
||||
const me = await res.json();
|
||||
user.set({ ...me, totpEnabled: parseTotpEnabled(getToken()) });
|
||||
} else {
|
||||
user.set(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user