[fix](trx-frontend-http): always show auth gate when no valid session
Do not auto-connect with guest role. Always show the auth gate when there's no valid session, allowing the user to choose between: - Login: Enter passphrase for control access - Continue as Guest: Proceed with read-only access (if available) This allows users to enter their control passphrase instead of being forced into guest mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -1163,16 +1163,9 @@ async function initializeApp() {
|
||||
connect();
|
||||
resizeHeaderSignalCanvas();
|
||||
startHeaderSignalSampling();
|
||||
} else if (authStatus.role) {
|
||||
// No session but role granted (guest mode available)
|
||||
authRole = authStatus.role;
|
||||
updateAuthUI();
|
||||
applyAuthRestrictions();
|
||||
connect();
|
||||
resizeHeaderSignalCanvas();
|
||||
startHeaderSignalSampling();
|
||||
} else {
|
||||
// Auth required - show login screen with optional guest button
|
||||
// No valid session - show auth gate
|
||||
// Guest button is shown if guest mode is available (role granted without auth)
|
||||
const allowGuest = authStatus.role === "rx";
|
||||
showAuthGate(allowGuest);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user