SignalR Negotiate | build compile issue
robcwaldron opened this issue · comments
I think you need to add the extra hub name.
.Negotiate("/negotiate", "hubName")
That way, it seems to work. On handling the handler itself so you can control the negotiate, this works
.Negotiate("/negotiate", AuthorizationTypeEnum.Anonymous, HttpMethod.Post)
Okay, I've been attempting to debug this. For more clarity, I'm using Authorization too. When I comment out the below, the issue goes away. Still trying to find what the cause is though. I'll report back if I can find it.
.Authorization(authorization => authorization
.AuthorizationDefault(AuthorizationTypeEnum.TokenValidation)
.AddOpenIdConnectTokenValidator($"https://{Domain}/oauth2/default/.well-known/oauth-authorization-server", Audience)
)
Is the example you gave earlier, is that what you are using?
.SignalR(signalR => signalR
.Negotiate("/negotiate")
Also, what do you have set up in the csproj? As i can replicate the issue. Oh, one other question, do you need to validate your openid bearer? I tried testing on both scenarios (anonymous with no auth, and also, another with the authorization in place for http w/ anonymous on the signalr).
Hey @mdg215199
Here's the snippet from the FunctionAppConfiguration and the csproj. Yes, ideally openid is used here for validation.
A
This should be resolved as part of beta 3 - its on NuGet now. Let me know if that helps. I was able to replicate in the acceptance tests and resolve so marking this as closed. Please reopen if you continue to face issues.
There were some breaking changes in the Microsoft.IdentityModel.Tokens package and its dependencies which rather unhelpfully they have not highlighted through semver. I'd updated to 5.6 but in an underlying JWT package (also a minor version bump) they've removed a method that the SignalR binding depends on. Resolution was to downgrade to 5.5.
Thanks @JamesRandall . Testing this now
@JamesRandall - this issue still exists in beta3. It's still reporting System.Runtime.Extensions Version 4.2.2.0 is not present.
@JamesRandall - 5.6 still seems to be referenced?
@JamesRandall - Okay, so I've tried to mock up what you've done in your screenshots. That's working fine. Where I still get this error is if I do this:
Also, no matter what i do (either VS Code or Visual Studio), I still end up with IdentityModel.Token 5.6