laravel/framework · error · InvalidArgumentException

Password resetter [{$name}] 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. there is no 'auth.passwords.{name}' entry in config/auth.php. The broker cannot be built without token-table/provider config.

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 bd6b5437e6)

Solutions

  1. Add an entry under 'passwords' in config/auth.php with table, provider, expire, and throttle.
  2. Verify auth.defaults.passwords matches an existing broker key.
  3. Confirm the broker name spelling used in Password::broker($name).
  4. Run php artisan config:clear after editing.

Example fix

// before - config/auth.php
'passwords' => [
    'users' => ['provider' => 'users', 'table' => 'password_reset_tokens', 'expire' => 60],
],
// Password::broker('admins') throws

// after
'passwords' => [
    'users' => ['provider' => 'users', 'table' => 'password_reset_tokens', 'expire' => 60],
    'admins' => ['provider' => 'admins', 'table' => 'password_reset_tokens', 'expire' => 60],
],
Defensive patterns

Strategy: validation

Validate before calling

$broker = 'admins';
if (is_null(config("auth.passwords.{$broker}"))) {
    throw new RuntimeException("Password broker [{$broker}] is not configured.");
}
Password::broker($broker);

Type guard

function brokerIsConfigured(string $broker): bool
{
    return ! is_null(config("auth.passwords.{$broker}"));
}

Try / catch

try {
    Password::broker($name)->sendResetLink($creds);
} catch (\InvalidArgumentException $e) {
    // fall back to default broker or abort with clear config error
}

Prevention

When it happens

Trigger: Calling Password::broker('admins') when 'admins' is not defined under auth.passwords; calling Password::broker() when auth.defaults.passwords points to a removed broker.

Common situations: Adding a multi-tenant broker but forgetting the auth.passwords entry; renaming the broker while the code still references the old name; env AUTH_PASSWORD_BROKER mismatch.

Related errors


AI-assisted analysis of laravel/framework@bd6b5437e6 (2026-08-06). Data as JSON: /data/errors/3f0380e1cb98f327.json. Report an issue: GitHub.