When accessing WB2 using the '/token?api_token=xxx' URL, the websocket
service was being initialized with 'api_token=undefined'.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>
let initialized = false;
return async () => {
const { router, auth } = store.getState();
let initialized = false;
return async () => {
const { router, auth } = store.getState();
- if (router.location && auth.user && !initialized) {
+ if (router.location && auth.user && services.authService.getApiToken() && !initialized) {
initialized = true;
initWebSocket(config, services.authService, store);
await store.dispatch(loadWorkbench());
initialized = true;
initWebSocket(config, services.authService, store);
await store.dispatch(loadWorkbench());