socialite fix

This commit is contained in:
Čarodej
2022-03-05 11:18:53 +01:00
parent 2c90db8e04
commit e0e488860d
4 changed files with 12 additions and 10 deletions
@@ -36,7 +36,7 @@ class SocialiteCallbackController extends Controller
$user->first()
);
return response('User logged in', 201);
return redirect()->to('/platform/files');
}
// Check if account registration is enabled
@@ -56,8 +56,11 @@ class SocialiteCallbackController extends Controller
]);
// Create User
($this->createNewUser)($data);
$user = ($this->createNewUser)($data);
return response('User registered', 201);
// Login user
$this->guard->login($user->first());
return redirect()->to('/platform/files');
}
}