#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

@@ -3,5 +3,18 @@
declare(strict_types=1);
use Illuminate\Support\Facades\Route;
use Toby\Http\Controllers\GoogleController;
use Toby\Http\Controllers\LogoutController;
Route::get("/", fn() => inertia("Dashboard"));
Route::middleware("auth")->group(function (): void {
Route::get("/", fn() => inertia("Dashboard"))->name("dashboard");
Route::post("/logout", LogoutController::class);
});
Route::middleware("guest")->group(function (): void {
Route::get("login", fn() => inertia("Login"))->name("login");
Route::get("login/google/start", [GoogleController::class, "redirect"])
->name("login.google.start");
Route::get("login/google/end", [GoogleController::class, "callback"])
->name("login.google.end");
});