@@ -87,7 +87,7 @@ function ReadestSync:addToMainMenu(menu_items)
|
||||
end
|
||||
else
|
||||
return function(menu)
|
||||
SyncAuth:logout(self.settings, menu)
|
||||
SyncAuth:logout(self.settings, self.path, menu)
|
||||
end
|
||||
end
|
||||
end,
|
||||
@@ -221,7 +221,7 @@ function ReadestSync:pullBookConfig(interactive)
|
||||
|
||||
SyncConfig:pull(
|
||||
self.ui, self.settings, client, book_hash, meta_hash, interactive,
|
||||
function() SyncAuth:logout(self.settings) end
|
||||
function() SyncAuth:logout(self.settings, self.path) end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -152,9 +152,9 @@ function SyncAuth:doLogin(settings, path, email, password, menu)
|
||||
end
|
||||
end
|
||||
|
||||
function SyncAuth:logout(settings, menu)
|
||||
function SyncAuth:logout(settings, path, menu)
|
||||
if settings.access_token then
|
||||
local client = self:getSupabaseAuthClient(settings, "")
|
||||
local client = self:getSupabaseAuthClient(settings, path)
|
||||
if client then
|
||||
client:sign_out(settings.access_token, function(success, _response)
|
||||
logger.dbg("ReadestSync: Sign out result:", success)
|
||||
|
||||
Reference in New Issue
Block a user