Skip to content

Blazor (WASM) SignalR AccessTokenProvider issue (3.2.0-preview1) #18697

@MitchellNZ

Description

@MitchellNZ

I have recently updated my Blazor project to latest preview version (3.2.0-preview1) and I am implementing the newly provided SignalR functionality for Client Side Blazor apps.

However, I have ran into an issue when using SignalR with auth.

Following this documentation (or this) I have configured my SignalR Client to use the AccessTokenProvider.
I would expect this to send the access_token as a query param (since the web-sockets do not support Headers), but this is not happening.


For anyone else who might read this and want a temporary work-around, thanks to @szmalec from the Blazor gitter chat. You can do something like the following:
.WithUrl(NavigationManager.ToAbsoluteUri("/chatHub?access_token=XXXX"))

But please be aware, this should only be temporary until the issue is fixed, as this method does not support WithAutomaticReconnect().

Metadata

Metadata

Assignees

Labels

Blazor ♥ SignalRThis issue is related to the experience of Signal R and Blazor working togetherarea-signalrIncludes: SignalR clients and serversbugThis issue describes a behavior which is not expected - a bug.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions