{"record":{"id":"3f0380e1cb98f327","repo":"laravel/framework","slug":"password-resetter-name-is-not-defined","errorCode":null,"errorMessage":"Password resetter [{$name}] is not defined.","messagePattern":"Password resetter \\[(.+?)\\] is not defined\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Illuminate/Auth/Passwords/PasswordBrokerManager.php","lineNumber":65,"sourceCode":"        $name = enum_value($name) ?: $this->getDefaultDriver();\n\n        return $this->brokers[$name] ?? ($this->brokers[$name] = $this->resolve($name));\n    }\n\n    /**\n     * Resolve the given broker.\n     *\n     * @param  string  $name\n     * @return \\Illuminate\\Contracts\\Auth\\PasswordBroker\n     *\n     * @throws \\InvalidArgumentException\n     */\n    protected function resolve($name)\n    {\n        $config = $this->getConfig($name);\n\n        if (is_null($config)) {\n            throw new InvalidArgumentException(\"Password resetter [{$name}] is not defined.\");\n        }\n\n        // The password broker uses a token repository to validate tokens and send user\n        // password e-mails, as well as validating that password reset process as an\n        // aggregate service of sorts providing a convenient interface for resets.\n        return new PasswordBroker(\n            $this->createTokenRepository($config),\n            $this->app['auth']->createUserProvider($config['provider'] ?? null),\n            $this->app['events'] ?? null,\n            timeboxDuration: $this->app['config']->get('auth.timebox_duration', 200000),\n        );\n    }\n\n    /**\n     * Create a token repository instance based on the given configuration.\n     *\n     * @param  array  $config\n     * @return \\Illuminate\\Auth\\Passwords\\TokenRepositoryInterface","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/laravel/framework/blob/e0f6eb3518ac29fbbca8529e97d0df7fc9f24481/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php#L47-L83","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Add an entry under 'passwords' in config/auth.php with table, model, and expiry settings.","Update 'defaults.passwords' to an existing broker key.","Match the broker name used in Password::broker() / password broker middleware to a declared key.","Run php artisan config:clear to drop a stale cached config."],"exampleFix":"// before\nPassword::broker('admins')->sendResetLink($creds);\n// config/auth.php 'passwords' => ['users' => [...]]\n\n// after\n// config/auth.php\n'passwords' => [\n    'users' => ['provider' => 'users', 'table' => 'password_resets', 'expire' => 60, 'throttle' => 60],\n    'admins' => ['provider' => 'admins', 'table' => 'password_resets', 'expire' => 60, 'throttle' => 60],\n],","handlingStrategy":"validation","validationCode":"// PHP — confirm the broker exists\nif (! is_array(config(\"auth.passwords.{$brokerName}\"))) {\n    abort(500, \"Password resetter [{$brokerName}] is not configured.\");\n}\nPassword::broker($brokerName)->sendResetLink($credentials);","typeGuard":"function brokerIsDefined(string $name): bool {\n    return is_array(config(\"auth.passwords.{$name}\"));\n}","tryCatchPattern":"try {\n    Password::broker($name)->sendResetLink($credentials);\n} catch (\\InvalidArgumentException $e) {\n    report('Unknown password broker: '.$e->getMessage());\n    throw $e;\n}","preventionTips":["Declare every broker under auth.php 'passwords' before referencing it.","Keep defaults.passwords pointed at an existing key.","Clear config cache after adding a broker."],"tags":["authentication","password-reset","laravel","configuration"],"backgroundTag":null,"analyzedSha":"e0f6eb3518ac29fbbca8529e97d0df7fc9f24481","analyzedAt":"2026-08-11T20:52:37.562Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}