Improve cross-app SSO when switching from QR Plus to Events.
Deploy Ladill Events / deploy (push) Successful in 26s
Deploy Ladill Events / deploy (push) Successful in 26s
Keep the shared auth session alive with periodic pings, store OIDC refresh tokens for silent re-login, and route launcher links through SSO connect. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
@if (auth()->check())
|
||||
{{-- Same-site iframe keeps the shared auth.ladill.com session warm while using this app. --}}
|
||||
<iframe src="https://{{ config('app.auth_domain') }}/sso/ping" hidden width="0" height="0" title=""></iframe>
|
||||
@php $authPing = 'https://'.config('app.auth_domain').'/sso/ping'; @endphp
|
||||
{{-- Same-site pings keep the shared auth.ladill.com session warm while using this app. --}}
|
||||
<iframe src="{{ $authPing }}" hidden width="0" height="0" title=""></iframe>
|
||||
<script>
|
||||
(function () {
|
||||
const pingUrl = @js($authPing);
|
||||
const ping = () => fetch(pingUrl, { credentials: 'include', mode: 'no-cors' }).catch(() => {});
|
||||
ping();
|
||||
setInterval(ping, 5 * 60 * 1000);
|
||||
})();
|
||||
</script>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user