From 96da0fd4e37ae211394415d381413514edece6c7 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 8 Oct 2019 15:32:59 +0200 Subject: [PATCH] simplify error --- app/Controller/Github/Callback.php | 4 +--- app/views/github/callback.phtml | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Controller/Github/Callback.php b/app/Controller/Github/Callback.php index bd8c0e5..2347d0e 100644 --- a/app/Controller/Github/Callback.php +++ b/app/Controller/Github/Callback.php @@ -23,9 +23,7 @@ class Callback extends Github function __invoke(array $args = null) { if ($this->app->getRequest()->getQuery("error")) { - $this->app->getView()->addData([ - "error" => $this->app->getRequest()->getQuery("error_description") - ]); + $this->app->getView()->addData($this->app->getRequest()->getQuery()->toArray()); } else { $this->validateUser(); diff --git a/app/views/github/callback.phtml b/app/views/github/callback.phtml index fae0bae..dde4896 100644 --- a/app/views/github/callback.phtml +++ b/app/views/github/callback.phtml @@ -1,2 +1,8 @@ layout("layout") ?> + +
+

e($error_description) ?>

+

Github error: e($error) ?>

+
+ -- 2.30.2