( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/..//tmpr/../tmpr/../tmpr/..//connect/auth-google.php
<?php
// Lightweight Google Sign-In proxy that signs out of apps first,
// then delegates Google OAuth to BrandCreator's existing handler.

require_once __DIR__ . '/auth.php';

$redirect = isset($_GET['redirect']) ? trim($_GET['redirect']) : '/insights/';

?>
<!doctype html>
<html lang="en" class="light-style layout-wide customizer-hide" data-theme="theme-default" data-assets-path="/brandcreator/dashboard/assets/" data-template="vertical-menu-template" data-style="light">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
  <title>Preparing Google Sign-In…</title>
  <link rel="stylesheet" href="/brandcreator/dashboard/assets/vendor/css/rtl/core.css" />
  <link rel="stylesheet" href="/brandcreator/dashboard/assets/vendor/css/rtl/theme-default.css" />
  <link rel="stylesheet" href="/brandcreator/dashboard/assets/css/demo.css" />
  <link rel="stylesheet" href="/brandcreator/dashboard/assets/vendor/css/pages/page-auth.css" />
  <style>.status{font-size:13px}.ok{color:#0a7f28}.err{color:#b00020}</style>
</head>
<body>
<div class="authentication-wrapper authentication-cover">
  <a href="/connect/index.php" class="app-brand auth-cover-brand gap-2">
    <span class="app-brand-logo demo"><img src="/brandcreator/files/assets/logo-white3.png" style="max-height:60px"></span>
  </a>
  <div class="authentication-inner row m-0">
    <div class="d-none d-lg-flex col-lg-7 col-xl-8 align-items-center p-5" style="background-image:url('/brandcreator/dashboard/assets/img/illustrations/business-meeting-over-coffee.png');background-size:cover;background-repeat:no-repeat;background-position:bottom;background-color:#9fccde;"></div>
    <div class="d-flex col-12 col-lg-5 col-xl-4 align-items-center authentication-bg p-sm-12 p-6">
      <div class="w-px-520 mx-auto mt-12 pt-5">
        <h4 class="mb-1">Signing you out to avoid conflicts…</h4>
        <div class="list-group mb-4">
          <div class="d-flex justify-content-between py-2"><span class="fw-bold">Insights</span><span id="st-insights" class="status">Pending…</span></div>
          <div class="d-flex justify-content-between py-2"><span class="fw-bold">Sites</span><span id="st-sites" class="status">Pending…</span></div>
          <div class="d-flex justify-content-between py-2"><span class="fw-bold">I</span><span id="st-i" class="status">Pending…</span></div>
        </div>
        <p class="text-muted">We’ll launch Google sign-in in a moment.</p>
      </div>
    </div>
  </div>
</div>
<script>
(function(){
  const statuses = {
    insights: document.getElementById('st-insights'),
    sites: document.getElementById('st-sites'),
    i: document.getElementById('st-i')
  };
  function setStatus(id, text, cls){
    statuses[id].textContent = text;
    statuses[id].className = 'status ' + (cls || '');
  }
  async function logoutAll(){
    setStatus('insights','Signing out…');
    setStatus('sites','Signing out…');
    setStatus('i','Signing out…');
    try {
      await Promise.allSettled([
        fetch('/insights/auth-logout.php', { credentials: 'include' }),
        fetch('/sites/index.php/logout', { credentials: 'include' }),
        fetch('/i/logout', { credentials: 'include' })
      ]);
      setStatus('insights','Done','ok');
      setStatus('sites','Done','ok');
      setStatus('i','Done','ok');
    } catch (e) {
      setStatus('insights','Done','ok');
      setStatus('sites','Done','ok');
      setStatus('i','Done','ok');
    }
  }
  (async function(){
    await logoutAll();
    const bridge = '/connect/google-complete.php?dest=' + encodeURIComponent(<?php echo json_encode($redirect); ?>);
    const url = '/brandcreator/dashboard/auth-google.php?redirect=' + encodeURIComponent(bridge);
    window.location.href = url;
  })();
})();
</script>
</body>
</html>