diff options
Diffstat (limited to 'auth')
-rw-r--r-- | auth/callback/index.php | 2 | ||||
-rw-r--r-- | auth/init/index.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/auth/callback/index.php b/auth/callback/index.php index 8d040e9..3b9d6eb 100644 --- a/auth/callback/index.php +++ b/auth/callback/index.php @@ -8,7 +8,7 @@ if (!isset($_GET['code'])) { die(); } -$appdata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); +$appdata = $GLOBALS["ColdHazeApp"]; $crl = curl_init('https://' . $server . '/hub/api/rest/oauth2/token'); curl_setopt($crl, CURLOPT_RETURNTRANSFER, true); diff --git a/auth/init/index.php b/auth/init/index.php index 3a4e7b7..9428825 100644 --- a/auth/init/index.php +++ b/auth/init/index.php @@ -2,5 +2,5 @@ $server = "auth.equestria.horse"; -header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["oauth"]["id"] . "&response_type=code&redirect_uri=https://ponies.equestria.horse/auth/callback&scope=Hub&request_credentials=default&access_type=offline"); +header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $GLOBALS["ColdHazeApp"]["oauth"]["id"] . "&response_type=code&redirect_uri=https://ponies.equestria.horse/auth/callback&scope=Hub&request_credentials=default&access_type=offline"); die(); |