diff --git a/.gitignore b/.gitignore
index b848d66..696344a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
vendor/
config.json
+composer.phar
+DOMAIN_OVERRIDE
diff --git a/auth/index.php b/auth/index.php
index 86b0c77..02ef7c4 100644
--- a/auth/index.php
+++ b/auth/index.php
@@ -18,6 +18,7 @@ if (isset($_REQUEST["act"])){
$MastCode = $_REQUEST["code"];
}
?>
+
- oauth->key."&client_secret=".$config->oauth->secret."&scope=read:accounts&redirect_uri=".$reqirectUri;
+ $origin = "https://tty.hackers.town";
+ if(file_exists("/var/www/usergen/DOMAIN_OVERRIDE")){
+ $origin = str_replace("\n", "", file_get_contents("/var/www/usergen/DOMAIN_OVERRIDE"));
+ }
+ $redirectUri = $origin."/auth";
+ $options = "grant_type=authorization_code&code=".$MastCode."&client_id=".$config->oauth->key."&client_secret=".$config->oauth->secret."&scope=read:accounts&redirect_uri=".$redirectUri;
curl_setopt($request, CURLOPT_POSTFIELDS, $options);
$response = curl_exec($request);
curl_close($request);
@@ -134,7 +143,7 @@ if (isset($_REQUEST["act"])){
}?>>
-
@@ -157,16 +166,18 @@ if (isset($_REQUEST["act"])){