Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Sep 23, 2020
1 parent 8cb8383 commit cb52f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/OAuthAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle($request, Closure $next, $account = 'default', $scope = n
$enforceHttps = Arr::get($config, 'oauth.enforce_https', false);

if ($request->has('code')) {
if (\is_callable($officialAccount->oauth, 'user')) {
if (\is_callable([$officialAccount->oauth, 'user'])) {
$user = $officialAccount->oauth->user();
} else {
$user = $officialAccount->oauth->userFromCode($request->query('code'));
Expand Down

0 comments on commit cb52f08

Please sign in to comment.