{"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/bd6b5437e6ad87bb49f9b426724f07a9f64e9683/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php#L47-L83","documentation":"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.","triggerScenarios":"Calling Password::broker('admins') when 'admins' is not defined under auth.passwords; calling Password::broker() when auth.defaults.passwords points to a removed broker.","commonSituations":"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.","solutions":["Add an entry under 'passwords' in config/auth.php with table, provider, expire, and throttle.","Verify auth.defaults.passwords matches an existing broker key.","Confirm the broker name spelling used in Password::broker($name).","Run php artisan config:clear after editing."],"exampleFix":"// before - config/auth.php\n'passwords' => [\n    'users' => ['provider' => 'users', 'table' => 'password_reset_tokens', 'expire' => 60],\n],\n// Password::broker('admins') throws\n\n// after\n'passwords' => [\n    'users' => ['provider' => 'users', 'table' => 'password_reset_tokens', 'expire' => 60],\n    'admins' => ['provider' => 'admins', 'table' => 'password_reset_tokens', 'expire' => 60],\n],","handlingStrategy":"validation","validationCode":"$broker = 'admins';\nif (is_null(config(\"auth.passwords.{$broker}\"))) {\n    throw new RuntimeException(\"Password broker [{$broker}] is not configured.\");\n}\nPassword::broker($broker);","typeGuard":"function brokerIsConfigured(string $broker): bool\n{\n    return ! is_null(config(\"auth.passwords.{$broker}\"));\n}","tryCatchPattern":"try {\n    Password::broker($name)->sendResetLink($creds);\n} catch (\\InvalidArgumentException $e) {\n    // fall back to default broker or abort with clear config error\n}","preventionTips":["Define every broker referenced in code under auth.passwords in config/auth.php.","Assert at boot that auth.defaults.passwords resolves to an existing broker.","Run config:clear after editing auth config."],"tags":["authentication","password-reset","configuration","laravel"],"analyzedSha":"bd6b5437e6ad87bb49f9b426724f07a9f64e9683","analyzedAt":"2026-08-06T00:28:32.783Z","schemaVersion":2}