{{-- Social sign-in block (Google One Tap + button, Facebook button) for the login and register pages. Renders ONLY the providers this panel has configured, so a panel with no Google app shows no Google button (and never loads GSI). SANCTIONED external scripts (cero-CDN exception, same as the CRM's FB SDK): • https://accounts.google.com/gsi/client — Google Identity Services, needed for One Tap + the official "Sign in with Google" button. Loaded ONLY on the auth pages, and ONLY when Google is enabled for the panel. The credential it returns is a JWT that is VERIFIED server-side (RS256 + aud + exp + email_verified) in SocialLoginController::google — never trusted as-is. No secret is exposed: the Client ID is public by design. --}} @props(['oneTap' => true]) @php $panel = current_panel(); $config = app(\App\Services\Auth\Social\SocialLoginConfig::class); $googleClientId = $panel ? $config->clientId($panel, 'google') : null; $facebookEnabled = $panel ? $config->isEnabled($panel, 'facebook') : false; // GSI labels its own button, and by default it follows the BROWSER language: // a visitor with Spanish Chrome read "Continuar con Google" on an English // page, next to a Facebook button that said "Continue with". Google takes a // BCP-47 tag (es, pt-BR), so the app locale — which is what the rest of the // page is rendered in — is passed on both surfaces it honours: `hl` on the // library URL (One Tap) and `locale` on renderButton (the button itself). $googleLocale = str_replace('_', '-', app()->getLocale()); @endphp @if ($googleClientId || $facebookEnabled)
@if ($googleClientId) @push('scripts') @endpush @endif @endif