Files
snapcad-studio/logout.php
T
Enes Yakıştır 33b0940012
Build and Push Docker Images / build (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s
feat: SnapCAD Studio'yu YakHub deposuna taşı
- DWG/DXF içe aktarma ve .skf yeniden açma düzeltmeleri

- YakNet Bulut eşitlemede boş/eski kopya koruması ve yerel-only proje bildirimi

- Panelden içe aktarma duyuruları ve erişilebilir Türkçe hata mesajları

- AGPL-3.0 lisansı, README ve YakHub bağlantıları
2026-10-25 18:20:21 +03:00

26 lines
924 B
PHP

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* SnapCAD — YakNet Ekosistemi Merkezi Çıkış (/logout.php)
* Hem yerel SnapCAD PHP oturumunu hem de merkezi YakNet SSO oturumunu kapatır.
*/
require_once __DIR__ . '/snap-config.php';
snapcad_logout();
$appOrigin = SNAPCAD_CANONICAL_URL;
if (!empty($_SERVER['HTTP_HOST']) && str_contains($_SERVER['HTTP_HOST'], 'localhost')) {
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$appOrigin = $scheme . '://' . $_SERVER['HTTP_HOST'];
}
// Eğer merkezi SDK logout'tan geri döndüysek doğrudan ana sayfaya yönlendir
if (!empty($_GET['slo_done'])) {
header('Location: ' . $appOrigin . '/?logged_out=1');
exit;
}
// Merkezi YakNet SSO oturumunu da kapat ve slo_done=1 ile geri dön
$returnAfterSlo = $appOrigin . '/logout.php?slo_done=1';
header('Location: ' . YAKNET_AUTH_BASE_URL . '/sdk/logout?redirect_uri=' . urlencode($returnAfterSlo));
exit;