diff --git a/routes/web.php b/routes/web.php index 1e2e2b7..1401f70 100644 --- a/routes/web.php +++ b/routes/web.php @@ -35,11 +35,9 @@ Route::get('/auth/github/callback', function() { try { SocialAuth::login('github'); } catch (ApplicationRejectedException $e) { - dd($e); - abort(401); + abort(401, $e->getMessage()); } catch (InvalidAuthorizationCodeException $e) { - dd($e); - abort(401); + abort(401, $e->getMessage()); } return Redirect::intended(); })->name('oauth-github-login'); diff --git a/sideload/socialnorm/socialnorm/src/SocialNorm.php b/sideload/socialnorm/socialnorm/src/SocialNorm.php index 1b4f9a4..1e30cf9 100644 --- a/sideload/socialnorm/socialnorm/src/SocialNorm.php +++ b/sideload/socialnorm/socialnorm/src/SocialNorm.php @@ -31,7 +31,6 @@ class SocialNorm { $state = $this->stateGenerator->generate(); - // this is for some reason needed, plain put doesn't work across the redirect \Session::put('oauth.state', $state); \Session::save(); @@ -52,7 +51,7 @@ class SocialNorm protected function verifyState() { if (\Session::get('oauth.state') !== $this->request->state()) { - throw new InvalidAuthorizationCodeException; + throw new InvalidAuthorizationCodeException("State failed to verify"); } } }