We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87d0aed commit 2eeb233Copy full SHA for 2eeb233
app/Http/Controllers/Auth/GitHubController.php
@@ -14,6 +14,7 @@
14
use Laravel\Socialite\Facades\Socialite;
15
use Laravel\Socialite\Two\InvalidStateException;
16
use Laravel\Socialite\Two\User as SocialiteUser;
17
+use function Pest\Laravel\instance;
18
19
class GitHubController extends Controller
20
{
@@ -38,6 +39,10 @@ public function handleProviderCallback()
38
39
return redirect()->route('login');
40
}
41
42
+ if ($socialiteUser instanceof RedirectResponse) {
43
+ return $socialiteUser;
44
+ }
45
+
46
try {
47
$user = User::findByGitHubId($socialiteUser->getId());
48
} catch (ModelNotFoundException $exception) {
0 commit comments