From 517c85d003d50c5b18a61835ce7a889d4a9795e3 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sun, 28 Aug 2022 17:37:55 +0900 Subject: [PATCH] =?UTF-8?q?misc:=20oauth.php=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=ED=91=9C=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oauth_kakao/oauth.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/oauth_kakao/oauth.php b/oauth_kakao/oauth.php index 72091933..d2f41c5e 100644 --- a/oauth_kakao/oauth.php +++ b/oauth_kakao/oauth.php @@ -9,7 +9,7 @@ WebUtil::setHeaderNoCache(); $auth_code = Util::getReq('code'); if(!$auth_code){ - + header('Location:oauth_fail.html'); } @@ -27,7 +27,12 @@ $result = $restAPI->create_access_token($auth_code); if (Util::array_get($result['expires_in'], -1) <= 0) { - die('알 수 없는 에러:'.Util::array_get($result['msg'], '')); + $errCode = $result['error_code'] ?? '(NoCode)'; + $error = $result['error'] ?? '(NoError)'; + $errorDesc = $result['error_description'] ?? '(NoDesc)'; + $msg = $result['msg'] ?? '(NoMsg)'; + + die("알 수 없는 에러: {$errCode},{$error},{$errorDesc},{$msg}"); } $session = Session::getInstance();