Aaron Parecki
8 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
2 changed files with
32 additions and
0 deletions
-
controllers/auth.php
-
views/settings.php
|
|
@ -267,6 +267,24 @@ $app->get('/signout', function() use($app) { |
|
|
|
$app->redirect('/', 302); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/auth/reset', function() use($app) { |
|
|
|
if($user=require_login($app, false)) { |
|
|
|
$user->authorization_endpoint = ''; |
|
|
|
$user->token_endpoint = ''; |
|
|
|
$user->micropub_endpoint = ''; |
|
|
|
$user->authorization_endpoint = ''; |
|
|
|
$user->micropub_media_endpoint = ''; |
|
|
|
$user->micropub_scope = ''; |
|
|
|
$user->micropub_access_token = ''; |
|
|
|
$user->save(); |
|
|
|
|
|
|
|
unset($_SESSION['auth']); |
|
|
|
unset($_SESSION['me']); |
|
|
|
unset($_SESSION['auth_state']); |
|
|
|
unset($_SESSION['user_id']); |
|
|
|
} |
|
|
|
$app->redirect('/', 302); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/auth/twitter', function() use($app) { |
|
|
|
if($user=require_login($app, false)) { |
|
|
|
|
|
@ -24,6 +24,14 @@ |
|
|
|
<td width="140">access token</td> |
|
|
|
<td><code style="word-break: break-word; white-space: pre-wrap;"><?= $this->user->micropub_access_token ?></code></td>
|
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td> |
|
|
|
<input type="button" class="btn btn-default" value="Reset Login" id="reset-login"> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
Clicking this button will erase the access token Quill has stored for you, forget all cached endpoints, and sign you out. If you sign back in, you will start over and see the debugging screens and scope options again. |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
|
|
|
|
|
|
|
@ -110,5 +118,11 @@ $(function(){ |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$("#reset-login").click(function(){ |
|
|
|
$.post("/auth/reset", function(){ |
|
|
|
window.location = "/"; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
</script> |