summaryrefslogtreecommitdiff
path: root/login/index.php
blob: 0e607d123a654a390e66daa65e0bdd8204d21f85 (plain)
1
2
3
4
5
6
7
<?php

$_CONFIG = json_decode(file_get_contents("/mnt/familine/private/FamilineConfig.json"), true);
setcookie("_auth_callback", $_GET['r'], 0, "/");

header("Location: https://" . $_CONFIG["Global"]["federation"] . "/hub/api/rest/oauth2/auth?client_id=" . json_decode(file_get_contents("/mnt/familine/private/app.json"), true)["id"] . "&response_type=code&redirect_uri=https://session." . $_CONFIG["Global"]["domain"] . "/oauth&scope=Hub&request_credentials=default&access_type=offline");
die();