@livedesk/client 0.1.53 → 0.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/livedesk-client.js +8 -1
- package/package.json +1 -1
package/bin/livedesk-client.js
CHANGED
|
@@ -1345,7 +1345,14 @@ async function prepareLoginConnection(parsed) {
|
|
|
1345
1345
|
if (shouldLogin) {
|
|
1346
1346
|
const supabase = await createSupabaseClient();
|
|
1347
1347
|
const startupArgs = buildStartupClientArgs(parsed);
|
|
1348
|
-
|
|
1348
|
+
let savedSession = null;
|
|
1349
|
+
if (parsed.startupRun) {
|
|
1350
|
+
try {
|
|
1351
|
+
savedSession = await refreshSessionIfNeeded(supabase);
|
|
1352
|
+
} catch (err) {
|
|
1353
|
+
console.warn(`LiveDesk saved sign-in could not be refreshed: ${err?.message || err}`);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1349
1356
|
const choice = savedSession?.access_token
|
|
1350
1357
|
? { type: 'google', session: savedSession }
|
|
1351
1358
|
: await chooseClientConnection(supabase, {
|