Fix platform session ping loop and harden meeting detail timezone display.
Deploy Ladill Meet / deploy (push) Successful in 38s

Defer inconclusive auth ping 401s instead of clearing SSO sessions; add client keepalive and safe timezone fallback on room pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 21:35:21 +00:00
co-authored by Cursor
parent f98d66c9f9
commit a18b571ae7
7 changed files with 51 additions and 9 deletions
+13 -6
View File
@@ -35,12 +35,12 @@ class EnsurePlatformSession
return $next($request);
}
$cookieHeader = (string) $request->headers->get('Cookie', '');
if ($cookieHeader === '') {
return $this->clearAppSession($request);
}
try {
$cookieHeader = (string) $request->headers->get('Cookie', '');
if ($cookieHeader === '') {
return $this->deferPlatformCheck($request, $next);
}
$response = Http::withHeaders(['Cookie' => $cookieHeader])
->timeout(3)
->connectTimeout(2)
@@ -50,7 +50,7 @@ class EnsurePlatformSession
}
if ($response->status() === 401) {
return $this->clearAppSession($request);
return $this->deferPlatformCheck($request, $next);
}
if ($response->successful()) {
@@ -60,6 +60,13 @@ class EnsurePlatformSession
return $next($request);
}
private function deferPlatformCheck(Request $request, Closure $next): Response
{
$request->session()->put('platform_session_verified_at', time());
return $next($request);
}
private function clearAppSession(Request $request): Response
{
Auth::logout();
+13
View File
@@ -151,6 +151,19 @@ class Room extends Model
return data_get($this->settings, $key, data_get(config('meet.default_settings'), $key, $default));
}
public function safeTimezone(): string
{
$timezone = (string) ($this->timezone ?: 'UTC');
try {
new \DateTimeZone($timezone);
return $timezone;
} catch (\Throwable) {
return 'UTC';
}
}
public function isLive(): bool
{
return $this->status === 'live';
@@ -57,5 +57,6 @@
@endauth
@include('partials.wallet-topup-modal', ['openOnLoad' => (bool) session('topup_required')])
@include('partials.afia')
@include('partials.sso-keepalive')
</body>
</html>
@@ -47,7 +47,7 @@
@if ($room->scheduled_at)
<p class="mt-3 text-sm text-slate-600">
Scheduled: {{ $room->scheduled_at->timezone($room->timezone)->format('M j, Y g:i A T') }}
Scheduled: {{ $room->scheduled_at->timezone($room->safeTimezone())->format('M j, Y g:i A T') }}
</p>
@endif
+1 -1
View File
@@ -50,7 +50,7 @@
@if ($room->scheduled_at)
<p class="mt-3 text-sm text-slate-600">
Scheduled: {{ $room->scheduled_at->timezone($room->timezone)->format('M j, Y g:i A T') }}
Scheduled: {{ $room->scheduled_at->timezone($room->safeTimezone())->format('M j, Y g:i A T') }}
</p>
@endif
+1 -1
View File
@@ -66,7 +66,7 @@
@if ($room->scheduled_at)
<p class="mt-3 text-sm text-slate-600">
Scheduled: {{ $room->scheduled_at->timezone($room->timezone)->format('M j, Y g:i A T') }}
Scheduled: {{ $room->scheduled_at->timezone($room->safeTimezone())->format('M j, Y g:i A T') }}
</p>
@endif
@@ -0,0 +1,21 @@
@if (auth()->check())
@php
$authPing = 'https://'.config('app.auth_domain').'/sso/ping';
$platformSignedOutUrl = route('sso.platform-signed-out', ['redirect' => url()->current()]);
@endphp
<script>
(function () {
const pingUrl = @js($authPing);
const signedOutUrl = @js($platformSignedOutUrl);
const ping = () => fetch(pingUrl, { credentials: 'include' })
.then((response) => {
if (response.status === 401) {
window.location.href = signedOutUrl;
}
})
.catch(() => {});
ping();
setInterval(ping, 5 * 60 * 1000);
})();
</script>
@endif