summaryrefslogtreecommitdiff
path: root/oauth/init/index.php
blob: f0696b27c1d87eeef18633dc9e85b53cac105831 (plain)
1
2
3
4
5
6
7
8
<?php

header("X-Frame-Options: DENY");
$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
$server = "account.equestria.dev";

header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $app["id"] . "&response_type=code&redirect_uri=" . ($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline");
die();