This commit is contained in:
ari
2025-11-21 15:19:22 +07:00
parent f40d25042b
commit 674a4be4ce
4 changed files with 15 additions and 8 deletions
+5 -4
View File
@@ -57,12 +57,12 @@ export function useKeycloak() {
}
};
const login = (options?: Keycloak.KeycloakLoginOptions) => {
const loginSSO = (options?: Keycloak.KeycloakLoginOptions) => {
if (!kc) throw new Error("Keycloak not initialized");
return kc.login(options);
};
const logout = (redirectUri?: string) => {
const logoutSSO = (redirectUri?: string) => {
if (!kc) throw new Error("Keycloak not initialized");
return kc.logout({ redirectUri });
};
@@ -78,6 +78,7 @@ export function useKeycloak() {
// });
const apiErrors = ref<Record<string, string>>({})
const { login } = useUserStore()
const getResponse = async () => {
console.log("=================== onto login fes!!! ===================")
@@ -108,8 +109,8 @@ export function useKeycloak() {
return {
initKeycloak,
login,
logout,
loginSSO,
logoutSSO,
getToken,
isAuthenticated,
getProfile,