fluffychat/web/auth.html
swherdman c581377999
feat: add autoSsoRedirect config option for automatic SSO login on web
When enabled via config.json, unauthenticated web users are
automatically redirected to the homeserver's SSO provider on page load,
bypassing the homeserver picker UI. Uses full-page redirect with
localStorage token recovery to avoid browser popup blocking.

Requires defaultHomeserver to also be set in config.json.
2026-02-20 17:51:02 +11:00

15 lines
No EOL
449 B
HTML

<!DOCTYPE html>
<title>Authentication complete</title>
<p>Authentication is complete. If this does not happen automatically, please close the window.</p>
<script>
var key = 'flutter-web-auth-2';
if (window.opener) {
window.opener.postMessage({
[key]: window.location.href
}, window.location.origin);
window.close();
} else {
localStorage.setItem(key, window.location.href);
window.location.replace('/');
}
</script>