Multiple SignalR Client connections in one Xamarin app management

Viewed 68

The problem: Convenient centralized management of SignalR connections on client side.

What I have is a Xamarin app that authorizes with Azure B2C and connects to the SignalR hub using acquired token.

The idea is that server side will have a multiple hubs (as end points/services) and app should connect to them all.

What I've done is created a base class that has essential hub connection creation logic, hub method calling and async callbacks registration and in this way I create multiple hub clients.

Problem is that I cannot start them on dependency registration to DI container as I need to authorize the user first.

How this could be managed? Does starting all connections one by one is the only possible way?

0 Answers
Related