lobstakit-cloud 1.0.10 → 1.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lobstakit-cloud",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "LobstaKit Cloud — Setup wizard and management for LobstaCloud gateways",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -30,16 +30,7 @@ async function checkAuth() {
30
30
  window.location.href = '/index.html'; // Go to setup
31
31
  return;
32
32
  }
33
- // Pre-fill email if stored
34
- if (status.email) {
35
- const emailEl = document.getElementById('email');
36
- if (emailEl) {
37
- emailEl.value = status.email;
38
- // Focus password field instead since email is pre-filled
39
- const pwEl = document.getElementById('password');
40
- if (pwEl) pwEl.focus();
41
- }
42
- }
33
+ // Don't pre-fill email /api/status returns masked email which confuses users
43
34
  } catch (e) {
44
35
  // Can't reach server — stay on login page
45
36
  }
package/server.js CHANGED
@@ -138,11 +138,9 @@ app.post('/api/auth/setup', (req, res) => {
138
138
  }
139
139
  }
140
140
 
141
- // Fallback to provision email if not provided
142
- if (!email) {
143
- if (provision && provision.email) {
144
- email = provision.email;
145
- }
141
+ // Prefer provision email over form value (form may contain masked email from pre-fill)
142
+ if (provision && provision.email) {
143
+ email = provision.email;
146
144
  }
147
145
 
148
146
  if (!email || !email.includes('@')) {
@@ -311,7 +309,7 @@ app.get('/api/provision', (req, res) => {
311
309
  const setupNotComplete = !lobstaConfig.passwordHash;
312
310
  const response = {
313
311
  provisioned: true,
314
- email: isAuthenticated ? (provision.email || null) : maskEmail(provision.email || ''),
312
+ email: (isAuthenticated || setupNotComplete) ? (provision.email || null) : maskEmail(provision.email || ''),
315
313
  subdomain: provision.subdomain || null,
316
314
  plan: provision.plan || null,
317
315
  };