Merge branch 'estif-branch-1' of https://github.com/Tria-plc/emaui into estif-branch-1

This commit is contained in:
Estifo77
2026-07-22 12:38:40 +03:00
6 changed files with 71 additions and 51 deletions

View File

@@ -138,8 +138,12 @@ export default function UserManagementPage() {
style.textContent = UM_OVERRIDES;
document.head.appendChild(style);
const token = localStorage.getItem('ema-backoffice-auth-token') ?? '';
const refreshToken = localStorage.getItem('ema-backoffice-refresh-token') ?? undefined;
const readCookie = (name: string) => {
const m = document.cookie.match(new RegExp('(?:^|;\\s*)' + name + '=([^;]*)'));
return m ? decodeURIComponent(m[1]) : undefined;
};
const token = readCookie('ema-backoffice-auth-token') ?? '';
const refreshToken = readCookie('ema-backoffice-refresh-token');
const session: UserManagementSessionOptions = {
initialSession: token

View File

@@ -11,7 +11,7 @@ import {
import type { AuthUser, CurrentProfile } from '@ema-platform/auth';
import { preferencesReducer } from './preferences.slice';
configureAuthStorage('ema-backoffice');
configureAuthStorage('ema-backoffice', true);
const preloadedAuth = (() => {
const token = authStorage.getToken();