Handles user authentication, two-factor, password reset, and token management in Laravel.
// Source: https://github.com/koel/koel | License: MIT | Copyright 2015 Phan An
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace App\Services\Auth;
use App\Exceptions\InvalidCredentialsException;
use App\Exceptions\InvalidLoginTokenException;
use App\Exceptions\RequiresTwoFactorException;
use App\Models\User;
use App\Repositories\UserRepository;
use App\Services\SecurityNoticeService;
use App\Values\CompositeToken;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Auth\Passwords\PasswordBroker;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
use SensitiveParameter;
use Throwable;
class AuthenticationService
{
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key