naif/generate-password
A Laravel/PHP package for generating secure, customizable passwords. Quickly create random passwords with configurable length and character sets, ideal for user onboarding, admin tools, and testing workflows.
A workflow decision, not a platform decision. The package's whole surface is a "generate" button next to a password input inside a Laravel Nova resource form. The only decision it informs is narrow and concrete: should internal operators provisioning accounts be able to mint a random temporary credential instead of typing Password123? That is an admin-console UX fix, not an architectural commitment, and it should be scoped and estimated that way.
Build vs. buy — where the defensible answer is "build inline." One Nova field class plus a small Vue component, 18 stars, zero dependents, no maintainer since March 2019. This is a reference implementation, not a dependency. The product call is to copy the pattern into a first-party App\Nova\Fields\RandomPassword, own it, and trade roughly half a day of engineering for the elimination of supply-chain and Nova-upgrade liability. Framing it as "buy" would be a category error; there is nothing to buy.
Roadmap scoping for internal tooling. If "secure credential generation for admins" appears in planning, it belongs as a checklist item inside an existing admin-console or onboarding epic — not a standalone initiative. It does not earn its own roadmap slot, dependency-review cycle, or security review. The engineering cost is a day; the coordination cost of treating it as a project would exceed the build.
An explicit scope boundary against customer authentication. This has no bearing on end-user signup, password reset, policy enforcement, credential storage, or MFA. Drawing that line in writing prevents "we have a password generator" from being read internally as "we have password security" — a misreading that is easy to make in a status update and expensive to correct later.
Modest, real support-load reduction. Fewer "I can't log in as the test user I just created" tickets from internal staff and QA, and fewer weak-credential habits in provisioning. Value it in minutes saved per provisioning event. Never value it as a security control.
A decision about evidence, not features. If provisioning falls under SOC 2 / ISO 27001 evidence, the absence of an audit trail (who generated a credential for whom) and any forced-rotation-on-first-login flag is the deciding input. That pushes you to a first-party field with an audit hook regardless of how good the button is — and it's the argument that most reliably moves the decision from "adopt" to "build."
Consider it — as a reference to read, almost never as a Composer dependency — only when all of the following hold:
fillUsing/resolveUsing, a copy-to-clipboard affordance — and reimplement it in-house rather than wire up the dependency.Look elsewhere — or build — when any of these are true:
Password::defaults() or Str::password() rather than treating the button as policy.random_int / Str::password() / crypto.getRandomValues. The source does not document the RNG, whether generation is client- or server-side, or whether the value can leak into DOM attributes, Vue state, request payloads, or logs. This code sits next to authentication and will be read that way in any security review.To executives: This is a small convenience feature for our internal admin console — a button that generates a random password when an operator provisions an account — and it discourages staff from defaulting to weak, reused credentials when creating test and internal users. The commercial case is not security; it's a handful of avoided support tickets and less time spent per provisioning event. Crucially, we do not propose adding a third-party dependency: the reference implementation is small enough that we rebuild it in-house in about a day, which keeps the supply-chain and upgrade-risk story clean and gives us full control over the code that sits next to authentication.
To engineering: Treat the package as a pattern to copy, not a library to install. Ship App\Nova\Fields\RandomPassword, back it with Str::password() (or a random_int-based generator on older Laravel) and let the server enforce Password::defaults() on submit while the browser proposes the value. Two guardrails carry most of the value and cost a dozen lines: a must_change_password flag with a forced change-password redirect on first login, and redacting password/password_confirmation in Telescope and any request-logging middleware before this ships. Watch the empty-string update path — updateRules('nullable') plus a hashed cast will happily hash '' — and put "copy this now, it cannot be retrieved after save" in help() with a clipboard affordance in the component.
To security/compliance: We are deliberately not adopting the 2019 package — no maintainer, undocumented RNG, unverified client- vs. server-side generation, Vue 2 and Nova 2-era assumptions. We are taking the UX idea and owning the implementation with a reviewed primitive, server-side policy enforcement, an audit entry recording who provisioned a credential for whom, and forced rotation on first login. If this falls under SOC 2 / ISO 27001 evidence, that audit hook is the reason to build rather than install — the package offers none.
To the team, on expectations: This is not password security, and it should never be described that way. It doesn't touch customer signup, resets, MFA, or storage. It removes a bad habit in an internal workflow. Frame it that way in the changelog so nobody later mistakes a convenience button for a control.
How can I help you explore Laravel packages today?