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

$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" ? "http://localhost:8043" : "https://wavy.equestria.horse") . "/oauth/callback&scope=Hub&request_credentials=default&access_type=offline");
die();