summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2015-07-12 14:01:21 -0700
committerAaron Parecki <aaron@parecki.com>2015-07-12 14:01:21 -0700
commit91307d4a362a8fab0022aba19ab74bec9cb46f8f (patch)
tree7b0aac89eab8460c18ab99a024ac2c6236c85bd5 /controllers
parent7a3532019bb992e46d1d4bd7bd1b157834a7cf69 (diff)
todo
Diffstat (limited to 'controllers')
-rw-r--r--controllers/auth.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/controllers/auth.php b/controllers/auth.php
index 1244fe0..3611416 100644
--- a/controllers/auth.php
+++ b/controllers/auth.php
@@ -118,6 +118,8 @@ $app->get('/auth/start', function() use($app) {
&& $user->authorization_endpoint == $authorizationEndpoint
&& !array_key_exists('restart', $params)) {
+ // TODO: fix this by caching the endpoints maybe in the session instead of writing them to the DB here.
+ // Then remove the line below that blanks out the access token
$user->micropub_endpoint = $micropubEndpoint;
$user->authorization_endpoint = $authorizationEndpoint;
$user->token_endpoint = $tokenEndpoint;
@@ -134,6 +136,7 @@ $app->get('/auth/start', function() use($app) {
$user->micropub_endpoint = $micropubEndpoint;
$user->authorization_endpoint = $authorizationEndpoint;
$user->token_endpoint = $tokenEndpoint;
+ $user->micropub_access_token = ''; // blank out the access token if they attempt to sign in again
$user->save();
$html = render('auth_start', array(