I have an app thats working with SignalR grids, but now we want to add bearer auth.
The token handling stuff has to happen before my SignalR promise is set, but the problem is the Kendo components required the SignalR promise to bind.
How can I set a SignalR promise that the Kendo components can use which will not resolve until my own token handling functions are complete?
Here is a sample of what we're doing:
getTokenPopup({ scopes: ["api://918c95d7-8c39-4486-9e15-83d061a30fa6/access_as_user"] }) .then(response => { $.ajaxSetup({ beforeSend: function (xhr) { xhr.setRequestHeader('Authorization', 'Bearer ' + response.accessToken); } }); myApp.hub = $.connection.searchHub; myApp.hubStart = $.connection.hub.start({ waitForPageLoad: false, transport: "longPolling" }); }) .catch(error => { console.error(error); });