#2 - authentication via google (#16)

* #2 - wip

* #2 - wip

* #2 - ui fixes to login page

* #2 - fix

* #2 - fix

* #2 - add title to login page

* Apply suggestions from code review

Co-authored-by: Krzysztof Rewak <krzysztof.rewak@blumilk.pl>

* #2 - cr fix

* #2 - cr fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
Co-authored-by: Krzysztof Rewak <krzysztof.rewak@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-01-13 14:19:11 +01:00
committed by GitHub
parent e015f02892
commit 0869395aab
31 changed files with 534 additions and 122 deletions

View File

@@ -6,20 +6,17 @@ namespace Toby\Http\Middleware;
use Illuminate\Http\Request;
use Inertia\Middleware;
use Toby\Http\Resources\UserResource;
class HandleInertiaRequests extends Middleware
{
public function share(Request $request): array
{
$user = $request->user();
return array_merge(parent::share($request), [
"auth" => fn() => [
"user" => [
"name" => "Chelsea Hagon",
"email" => "chelseahagon@example.com",
"role" => "Human Resources Manager",
"imageUrl" =>
"https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
],
"user" => $user ? new UserResource($user) : null,
],
"flash" => fn() => [
"success" => $request->session()->get("success"),