Skip to content

Can no longer open signalr hub conection using bearer token after upgrading from 9.0.4 to 9.0.9 #63919

@groogiam

Description

@groogiam

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I recently updated from 9.0.4 to 9.0.9 and the following signalr connection code no longer works. I have verified the bearer token is set. No other code has changed in my solution other than than the package versions.

_myHubConnection = new HubConnectionBuilder()
                .WithUrl(new Uri(serverBaseUri, HubRelativePath),
                    options => { options.AccessTokenProvider = () => Task.FromResult(BearerToken); })
                .WithAutomaticReconnect()
                .Build();

await _myHubConnection .StartAsync()

I receive the following error

Unknown Error
System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 401 (Unauthorized).)

Expected Behavior

SignalR authentication should work as it did in 9.0.4

Steps To Reproduce

See code above.

Exceptions (if any)

No response

.NET Version

9.0.305

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions