graham-campbell/credentials
A Laravel package by Graham Campbell for managing application credentials. It offers a simple, configurable way to store and retrieve sensitive values such as API keys, tokens, and passwords, helping keep them organized and out of your codebase. Integrates smoothly with Laravel's container and confi...
HasCredentials trait on Eloquent models, encrypted-at-rest values, a get/set API, and a migration-ready schema. It gives engineering and product a concrete reference point for scoping "we build it," "we adopt Socialite/Sanctum plus a secrets manager," or "we fork this," which is the actual decision in front of you..env files and config — is a prerequisite for any self-serve credential UI. This package scopes that capability cheaply enough to decide whether to expose it, and what the security posture of that surface must be.Consider it when:
Look elsewhere when:
composer.json, the service provider, migrations, and config before anything else.Signal read: zero stars and zero dependents don't disqualify it as a reference implementation, but they do disqualify it as a runtime dependency in an authentication or secrets path. An auth library with no adopter base has no one finding its security bugs first.
For executives (30 seconds): This is a small, single-purpose Laravel library for storing and managing user credentials — social sign-in, API tokens, and app secrets — in one central, encrypted place, tied to user records. The product idea is right: it maps to signup conversion, developer onboarding, and keeping secrets out of source control. But it targets a Laravel version we should not still be running, it has no adoption and no maintenance signal, and its own documentation disagrees about what it does. My recommendation: fund the capability, not this package. Take its credential model and API as the spec, build on Laravel's first-party auth (Socialite/Sanctum) plus the platform secrets manager, and ship the same user-facing outcome on a dependency we can defend in a security review.
For engineering (the ask): Read the service provider, config, migrations, and storage pattern — do not add the dependency to a new or modern build. Step one is a one-day spike to settle what the package actually is: vault, auth driver, or OAuth. Estimate against first-party auth; the OAuth handshake is the cheap part. The non-obvious scope is credential lifecycle — issuance, one-time reveal, rotation, revocation, duplicate-identity handling, and account linking. No package gives us that, so budget for it explicitly. If a legacy Laravel 5 app forces adoption, isolate it behind an internal auth adapter, vendor-pin it, assign an owner, and set a deprecation date from day one. Migrate credential rows with hashes preserved, not re-hashed, and stage cutover behind dual-read with a tested rollback.
For the roadmap: Treat this as a conversion and developer-experience experiment, not a platform bet. Scope it to two providers or one token flow, instrument signup completion, activation, and API-key adoption, and be prepared to keep or kill it on funnel data within a quarter. The identity and credential schema we choose now is the expensive part — get the many-credentials-to-one-user shape right even if v1 ships a single provider.
How can I help you explore Laravel packages today?