fix: show sign-in gate on private spaces instead of redirecting away
Previously, visiting a private space on *.rspace.online without a session redirected to rspace.online, causing a redirect loop after login. Now shows the sign-in gate in-place so the user logs in and stays on the same page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
928867a9e2
commit
c8622bd82b
|
|
@ -844,14 +844,8 @@ export function renderShell(opts: ShellOptions): string {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private spaces: redirect logged-out visitors to the module landing page
|
// Private spaces: show sign-in gate for logged-out visitors
|
||||||
if (!hasToken) {
|
if (!hasToken) {
|
||||||
var host = window.location.host.split(':')[0];
|
|
||||||
if (host.endsWith('.rspace.online') || host === 'rspace.online') {
|
|
||||||
var modId = document.body.getAttribute('data-module-id') || 'rspace';
|
|
||||||
window.location.replace('https://rspace.online/' + modId);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
showGate('sign-in');
|
showGate('sign-in');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue