diff options
| author | Aaron Parecki <aaron@parecki.com> | 2015-07-25 16:51:19 -0700 | 
|---|---|---|
| committer | Aaron Parecki <aaron@parecki.com> | 2015-07-25 16:51:19 -0700 | 
| commit | 5122efff7fd664c70e92e90d82b1a0ac7edb750b (patch) | |
| tree | 2c465e53288183e337e68a433e72c6b72b3a8b37 | |
| parent | b302c08cfff073c29bceb6bda7cefc80eb62eaa7 (diff) | |
remove hard-coded reference to client_id
| -rw-r--r-- | controllers/auth.php | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/controllers/auth.php b/controllers/auth.php index 33baa3e..4ec0db7 100644 --- a/controllers/auth.php +++ b/controllers/auth.php @@ -4,10 +4,6 @@ function buildRedirectURI() {    return Config::$base_url . 'auth/callback';  } -function clientID() { -  return 'https://quill.p3k.io'; -} -  function build_url($parsed_url) {     $scheme   = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';     $host     = isset($parsed_url['host']) ? $parsed_url['host'] : '';  @@ -103,7 +99,7 @@ $app->get('/auth/start', function() use($app) {      $_SESSION['auth_state'] = $state;      $scope = 'post'; -    $authorizationURL = IndieAuth\Client::buildAuthorizationURL($authorizationEndpoint, $me, buildRedirectURI(), clientID(), $state, $scope); +    $authorizationURL = IndieAuth\Client::buildAuthorizationURL($authorizationEndpoint, $me, buildRedirectURI(), Config::$base_url, $state, $scope);    } else {      $authorizationURL = false;    } @@ -216,7 +212,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(), k($params,'state'), true); +    $token = IndieAuth\Client::getAccessToken($tokenEndpoint, $params['code'], $params['me'], buildRedirectURI(), Config::$base_url, k($params,'state'), true);    } else {      $token = array('auth'=>false, 'response'=>false); | 
