From 2ea9b1485e2a25af047d8418e5404df461f96f19 Mon Sep 17 00:00:00 2001 From: sergesoroka Date: Fri, 4 Oct 2024 10:38:52 +0300 Subject: [PATCH] Use keycloak.token and localStorage for the first requst --- utils/useFetch.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/useFetch.jsx b/utils/useFetch.jsx index c5d389b..8fe2226 100644 --- a/utils/useFetch.jsx +++ b/utils/useFetch.jsx @@ -22,7 +22,7 @@ function useFetch(url) { axiosInstance.interceptors.request.use( function (config) { if (kc_token) { - config.headers.Authorization = `Bearer ${keycloak.token}`; + config.headers.Authorization = `Bearer ${kc_token}`; } return config; },