diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/auth-page.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/auth-page.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js index c12db72..57db475 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js @@ -185,8 +185,12 @@ export function LoginPage({ onLogin }) { // Trimmed to match the hub's stored username and every client-side key // derivation (auth_key, bundle_key, recovery_key all fold the username in). await onLogin(name, password); - // Back to the invitation that sent them here, if one is waiting. - navigate(loadPending() ? '/invite' : '/'); + // Back to the invitation that sent them here, if one is waiting. Otherwise + // nowhere: on `#/login` or `#/register` the router sends a signed-in + // person home itself, and anywhere else this form stood in for the page + // the address names — a group, a file in one — which is where they were + // going. Sending everyone home lost every link opened signed out. + if (loadPending()) navigate('/invite'); } catch (err) { if (err.message === 'email_verification_required') { setPendingVerif(true); |