dreamfactory/df-oauth
DreamFactory OAuth package that adds OAuth-based authentication to DreamFactory APIs, letting clients sign in with external providers and obtain secure access tokens. Integrates with DreamFactory users and roles for controlled API access.
Architecture fit. dreamfactory/df-oauth is not a general-purpose Laravel package — it is a first-party module of the DreamFactory platform (a self-hosted, Laravel-based API gateway / governed data-access layer). It registers a service provider against df-core, ships system config, migrations, seed data, and admin-console wiring, and plugs into DreamFactory's existing multi-mode auth stack (API key, JWT, LDAP/AD, SAML, OAuth/OIDC). For a TPM, the correct framing is: this is a plugin you adopt because you are adopting DreamFactory, not a library you drop into an existing Laravel app. Pulling it into a vanilla Laravel codebase drags in df-core and effectively the whole platform.
Integration feasibility.
composer require, run platform migrations/setup, configure an OAuth/OIDC provider in the admin console, map claims to DreamFactory roles.Technical risk.
df-core major/minor line; the package is versioned in lockstep with the platform, so independent upgrades are not realistic.Key questions for the vendor/repo.
Stack fit. Only a fit if the target stack is DreamFactory 4.x/5.x on a supported PHP/Laravel runtime, Composer-managed, with the platform already serving or slated to serve APIs. If the requirement is "add OIDC login to our Laravel app," a purpose-built package (Laravel Socialite, openid-client, laravel/passport) is the correct choice and df-oauth is a category error.
Migration path. The realistic sequence is auth modernization inside DreamFactory, not a lift-and-shift:
Compatibility. Pin dreamfactory/dreamfactory and df-core to explicit versions in composer.lock; validate the PHP/Laravel matrix against your base image. Review the package's migrations and seeders for collisions with existing system tables and for idempotency on re-run. Confirm whether it mutates system_config in ways that complicate rollback.
Sequencing. PoC (2–3 weeks) → security review of token flows (1–2 weeks, parallel) → pilot with one low-risk internal app → staged rollout by consumer group → legacy key sunset with a dated deadline. Do not sequence this ahead of a platform upgrade; do it on a frozen platform version.
Maintenance. Owned and released by DreamFactory; you inherit their cadence. With zero dependents there is no community patch stream — if upstream stalls, your only options are a paid support contract or an internal fork you must maintain against df-core changes. Budget for a named owner and a quarterly upgrade-and-retest cycle.
Support. Commercial support from DreamFactory is the primary channel; GitHub issues are secondary and low-traffic. Escalation paths should be established contractually before this becomes auth-critical infrastructure.
Scaling. Token validation scales well if you keep it stateless (JWT signature check against cached JWKS). Token issuance, introspection, and any database-backed token store are the bottlenecks — expect additional DB writes per login/refresh and per-request lookups if introspection is enabled. Cache JWKS aggressively, set short access-token TTLs with refresh, and rate-limit the token endpoint. Auth now sits on the critical path of every API call: size it accordingly.
Failure modes to design for.
kid mismatches.Ramp-up. A mid-level backend engineer needs roughly 1–2 weeks to become productive (DreamFactory service/config model, Laravel service-provider conventions, OAuth/OIDC flows) and 3–4 weeks to be genuinely safe operating the auth boundary. Add dedicated security-review time before production. Document the token lifecycle, role-mapping table, and rollback procedure as first-class runbooks — with a 6-star dependency, institutional knowledge is the real redundancy.
How can I help you explore Laravel packages today?