Skip to content

Add support for SignalR hubs requiring authorization#2103

Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom
PerfectlyNormal:feat/signalr-accesstoken
Feb 4, 2026
Merged

Add support for SignalR hubs requiring authorization#2103
jeremydmiller merged 1 commit intoJasperFx:mainfrom
PerfectlyNormal:feat/signalr-accesstoken

Conversation

@PerfectlyNormal
Copy link
Contributor

Not really happy with the error handling in SignalRClientEndpoint.BuildListenerAsync. Since we try connecting immediately any errors prevents us from starting. The most common error will (probably) be unauthorized, so catching and logging that. But there's probably a lot better ways of handling this.

SignalR expects a Func<Task<string?>> as a token provider. I wrapped that so we get access to the IServiceProvider to get configuration or anything like that. That turns into a Func<IServiceProvider, Func<Task<string?>>> which isn't very pretty.

Feel free to edit or suggest improvements

@jeremydmiller
Copy link
Member

@PerfectlyNormal One thing at a time. Let's go w/ what you've done and just collect feedback from users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants