This commit is contained in:
2026-01-30 17:20:52 +09:00
commit 21b6332c9c
459 changed files with 190743 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
// /auth/oauth-callback.php
$code = $_POST['code'] ?? null;
if (!$code) {
echo 'Invalid callback';
exit;
}
?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>로그인 처리중...</title>
</head>
<body>
<script>
fetch('/api/auth/verify-login.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({
code: <?= json_encode($code) ?>
})
})
.then(res => res.json())
.then(result => {
if (window.opener) {
window.opener.postMessage({
type: result.status === 'success' ? 'LOGIN_SUCCESS' : 'LOGIN_FAIL',
payload: result.user || result.message
}, location.origin);
}
window.close();
});
</script>
</body>
</html>