Skip to content

Commit

Permalink
fix(controller): removes session-tracker from TwoFactorController
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-ninja committed Sep 27, 2024
1 parent 879041d commit 746b572
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This package provides session tracking functionalities, multi session management
* Authenticated User Devices
* Session Management
* Session blocking
* Google 2FA support for session locking
* Google 2FA support
* Session location tracking
* Device verifying
* Device hijacking detection (WIP)
Expand Down
16 changes: 12 additions & 4 deletions routes/devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@
"prefix" => "api/2fa",
"middleware" => Config::get("devices.auth_middleware")
], function (): void {
Route::get("/code", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@code")->name("code");
Route::post("/verify", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@verify")->name("verify");
Route::patch("/disable", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@disable")->name("disable");
Route::patch("/enable", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@enable")->name("enable");
Route::get("/code", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@code")
->withoutMiddleware(['session-tracker'])
->name("code");
Route::post("/verify", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@verify")
->withoutMiddleware(['session-tracker'])
->name("verify");
Route::patch("/disable", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@disable")
->withoutMiddleware(['session-tracker'])
->name("disable");
Route::patch("/enable", "Ninja\DeviceTracker\Http\Controllers\TwoFactorController@enable")
->withoutMiddleware(['session-tracker'])
->name("enable");
});

0 comments on commit 746b572

Please sign in to comment.