laravel/framework · error · InvalidArgumentException

Password resetter [ ] is not defined.

Error message

Password resetter [{$name}] is not defined.

What it means

Thrown by PasswordBrokerManager::resolve() when getConfig($name) returns null — i.e. no broker entry exists in config/auth.php under 'passwords' for the requested name. The broker is the password-reset wiring (token repository + user provider + events).

Solutions

  1. Add an entry under 'passwords' in config/auth.php with table, model, and expiry settings.
  2. Update 'defaults.passwords' to an existing broker key.
  3. Match the broker name used in Password::broker() / password broker middleware to a declared key.
  4. Run php artisan config:clear to drop a stale cached config.

Example fix

// before
Password::broker('admins')->sendResetLink($creds);
// config/auth.php 'passwords' => ['users' => [...]]

// after
// config/auth.php
'passwords' => [
    'users' => ['provider' => 'users', 'table' => 'password_resets', 'expire' => 60, 'throttle' => 60],
    'admins' => ['provider' => 'admins', 'table' => 'password_resets', 'expire' => 60, 'throttle' => 60],
],
Defensive patterns

Strategy: validation

Validate before calling

// PHP — confirm the broker exists
if (! is_array(config("auth.passwords.{$brokerName}"))) {
    abort(500, "Password resetter [{$brokerName}] is not configured.");
}
Password::broker($brokerName)->sendResetLink($credentials);

Type guard

function brokerIsDefined(string $name): bool {
    return is_array(config("auth.passwords.{$name}"));
}

Try / catch

try {
    Password::broker($name)->sendResetLink($credentials);
} catch (\InvalidArgumentException $e) {
    report('Unknown password broker: '.$e->getMessage());
    throw $e;
}

Prevention

When it happens

Trigger: Calling Password::broker($name) or using the password.reset / password.email routes with the broker name absent from 'passwords'; using the default broker when 'defaults.passwords' points at a non-existent key; referencing Password::broker('admins') before declaring it.

Common situations: Adding a multi-broker reset setup but forgetting the 'passwords' entry; renaming a broker while the route/middleware still references the old name; config cache predating the new broker; typo in the broker string.

Related errors


AI-assisted analysis of laravel/framework@e0f6eb3518 (2026-08-11). Data as JSON: /api/errors/3f0380e1cb98f327. Report an issue: GitHub.

Appendix: source

Thrown at src/Illuminate/Auth/Passwords/PasswordBrokerManager.php:65

        $name = enum_value($name) ?: $this->getDefaultDriver();

        return $this->brokers[$name] ?? ($this->brokers[$name] = $this->resolve($name));
    }

    /**
     * Resolve the given broker.
     *
     * @param  string  $name
     * @return \Illuminate\Contracts\Auth\PasswordBroker
     *
     * @throws \InvalidArgumentException
     */
    protected function resolve($name)
    {
        $config = $this->getConfig($name);

        if (is_null($config)) {
            throw new InvalidArgumentException("Password resetter [{$name}] is not defined.");
        }

        // The password broker uses a token repository to validate tokens and send user
        // password e-mails, as well as validating that password reset process as an
        // aggregate service of sorts providing a convenient interface for resets.
        return new PasswordBroker(
            $this->createTokenRepository($config),
            $this->app['auth']->createUserProvider($config['provider'] ?? null),
            $this->app['events'] ?? null,
            timeboxDuration: $this->app['config']->get('auth.timebox_duration', 200000),
        );
    }

    /**
     * Create a token repository instance based on the given configuration.
     *
     * @param  array  $config
     * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface

View on GitHub (pinned to e0f6eb3518)