api: fix sync not working on android

This commit is contained in:
Abdullah Atta
2025-09-29 12:14:20 +05:00
committed by Abdullah Atta
parent cfe2875a67
commit 7172510c9e

View File

@@ -131,13 +131,9 @@ namespace Notesnook.API
options.DiscoveryPolicy.RequireHttps = false;
options.TokenRetriever = new Func<HttpRequest, string>(req =>
{
if (req.Path == "/hubs/sync/v2")
{
var fromQuery = TokenRetrieval.FromQueryString(); //needed for signalr and ws/wss conections to be authed via jwt
return fromQuery(req);
}
var fromHeader = TokenRetrieval.FromAuthorizationHeader();
return fromHeader(req);
var fromQuery = TokenRetrieval.FromQueryString(); //needed for signalr and ws/wss conections to be authed via jwt
return fromHeader(req) ?? fromQuery(req);
});
options.Events.OnTokenValidated = (context) =>