Skip to content

Commit

Permalink
Merge pull request #97 from ttimot24/generate-token
Browse files Browse the repository at this point in the history
Generate token
  • Loading branch information
ttimot24 authored Dec 15, 2024
2 parents 598c34e + d753bc1 commit 29dd478
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Routing\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Str;

class LoginController extends Controller
{
Expand Down Expand Up @@ -66,7 +67,11 @@ public function showLoginForm()
]);
}


protected function authenticated(Request $request, $user)
{
$user->api_token = Str::random(60);
$user->save();
}

public function logout(Request $request)
{
Expand Down

0 comments on commit 29dd478

Please sign in to comment.