rename frontend directory to frontend

This commit is contained in:
Viktor Barzin 2025-06-14 15:43:14 +00:00
parent 71a9b69e04
commit c7d996dbeb
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
30 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,18 @@
import { User, UserManager } from 'oidc-client-ts';
import { oidcConfig } from './config';
const userManager = new UserManager(oidcConfig);
export const login = () => userManager.signinRedirect();
export const logout = () => userManager.signoutRedirect();
export const handleCallback = () => userManager.signinRedirectCallback();
export const getUser = async (): Promise<User | null> => {
try {
const user = await userManager.getUser();
return user;
} catch (error) {
console.error('Error fetching user:', error);
return null;
}
};