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.
15 lines
No EOL
449 B
HTML
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> |