summaryrefslogtreecommitdiff
path: root/controllers/auth.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2015-04-25 10:37:40 -0700
committerAaron Parecki <aaron@parecki.com>2015-04-25 10:37:40 -0700
commitfb6d4181e429833f083ddd7e1770ed99a70949db (patch)
tree68ab7bcf8613c6b33fafe0c14606ea6d281f84d2 /controllers/auth.php
parente456edd83b88d83a4b2ae274fa91f517bba8cf6a (diff)
fix for https redirect uri
Diffstat (limited to 'controllers/auth.php')
-rw-r--r--controllers/auth.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/auth.php b/controllers/auth.php
index 13081c4..a2fa08f 100644
--- a/controllers/auth.php
+++ b/controllers/auth.php
@@ -1,7 +1,7 @@
<?php
function buildRedirectURI() {
- return 'http://' . $_SERVER['SERVER_NAME'] . '/auth/callback';
+ return Config::$base_url . 'auth/callback';
}
function clientID() {
@@ -203,7 +203,7 @@ $app->get('/auth/callback', function() use($app) {
$tokenEndpoint = IndieAuth\Client::discoverTokenEndpoint($me);
if($tokenEndpoint) {
- $token = IndieAuth\Client::getAccessToken($tokenEndpoint, $params['code'], $params['me'], buildRedirectURI(), clientID(), $params['state'], true);
+ $token = IndieAuth\Client::getAccessToken($tokenEndpoint, $params['code'], $params['me'], buildRedirectURI(), clientID(), k($params,'state'), true);
} else {
$token = array('auth'=>false, 'response'=>false);