From 7172510c9e603e184d7619cc2f58907e9fb76864 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 29 Sep 2025 12:14:20 +0500 Subject: [PATCH] api: fix sync not working on android --- Notesnook.API/Startup.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Notesnook.API/Startup.cs b/Notesnook.API/Startup.cs index baeaf5c..4ad8b4e 100644 --- a/Notesnook.API/Startup.cs +++ b/Notesnook.API/Startup.cs @@ -131,13 +131,9 @@ namespace Notesnook.API options.DiscoveryPolicy.RequireHttps = false; options.TokenRetriever = new Func(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) =>