Closed rh-gvincent closed 8 months ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ammont82, rh-gvincent
The full list of commands accepted by this bot can be found here.
useEffect(() => {
auth
.getUser()
.then(() => auth.getToken())
.then((token) => {
Api.setAuthInterceptor(...);
})
.finally(() => setIsLoading(false));
}, []);
code we use in federated modules when we reuse the setAuthInterceptor
Today if we call setAuthInterceptor multiple times, it's not working because we reuse previous client and clientWithoutCaseConverter. Config url in withAssistedInstallerBasePath for example is applied multiple times.
Normally we call setAuthInterceptor only one time. But with recent module federated code, we call setAuthInterceptor every time we load the component. We also remove the job template created earlier