Skip to content

Commit 57bd07f

Browse files
committed
revert(auth): restore popup fallback — loopback failure cause unknown, investigate via logs
1 parent ba400b2 commit 57bd07f

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tigertag-inventory",
3-
"version": "1.7.7",
3+
"version": "1.7.8",
44
"description": "Tiger Studio Manager — desktop app",
55
"main": "main.js",
66
"engines": {

‎renderer/inventory.js‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3125,17 +3125,12 @@ import { elgFanStep } from './printers/elegoo/widget_control.js';
31253125
const r = await loopback();
31263126
if (!r?.ok) {
31273127
// Loopback failed (user closed the browser tab, network error, etc.).
3128-
// Do NOT fall back to signInWithPopup — the Electron popup cannot
3129-
// handle passkeys / Touch ID, and would leave the user stuck on the
3130-
// "Use your passkey" screen with no way forward.
3131-
// Instead, show an actionable error so the user can retry the
3132-
// loopback (reopen browser) or use email/password below.
3133-
console.warn("[auth.google] loopback failed:", r?.error);
3134-
toast($("addModalResult"), "bad",
3135-
"Google sign-in via browser failed — please try again or use email/password.",
3136-
{ context: "auth.google.loopback" }
3137-
);
3138-
return; // exit the click handler — user stays on the login form
3128+
// Fall back to signInWithPopup — it may hit the passkey screen but
3129+
// the user can click "Try another method" → password to proceed.
3130+
console.warn("[auth.google] loopback failed, falling back to popup:", r?.error);
3131+
const provider = new firebase.auth.GoogleAuthProvider();
3132+
provider.setCustomParameters({ prompt: "select_account" });
3133+
result = await firebase.auth().signInWithPopup(provider);
31393134
} else {
31403135
// Build a Firebase credential from the tokens Google returned.
31413136
// We pass BOTH idToken and accessToken: if the idToken's audience

0 commit comments

Comments
 (0)