Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Oidc Laravel Package

jeffersongoncalves/laravel-oidc

Laravel OIDC integrates OpenID Connect authentication into Laravel applications. It helps configure providers, redirect users to sign in, validate ID tokens, and retrieve user profile data with a simple, framework-friendly setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a Laravel relying-party (client) implementation for OIDC/OAuth2. Prior to v1.3.0 it appears to have been effectively stateless from a data-model perspective — authentication resolved into the framework's normal session/guard flow with no first-class persistence of the IdP identity itself.
  • v1.3.0 introduces an optional persistence layer: OidcIdentity model, HasOidcIdentities trait, and a publishable create_oidc_identities_table migration. This is an architectural step change — the package now models the (issuer, subject) → authenticatable relationship. That is the correct primitive for multi-provider SSO, account linking, and audit trails, and the fact that it is opt-in and publishable means existing consumers are not forced into the new model.
  • Configurable table name (oidc.identities_table) is a small but meaningful signal of maturity: it accommodates multi-tenant/multi-connection deployments without forking the migration.

Integration feasibility

  • Greenfield: high. Add the trait to the Authenticatable model, publish and run the migration, configure the table name if non-default.
  • Brownfield: moderate. Existing installs upgrade without touching the migration, but any team wanting identity linkage must (a) publish assets, (b) modify the User model, and (c) accept that identities are populated lazily on next login — there is no backfill path in this release.
  • The Guzzle constraint fix is the headline for installability: restoring guzzlehttp/guzzle ^7.8 unblocks Laravel 11/12 installs. This implies the prior constraint was over-tight and had been silently excluding a large share of the addressable user base.

Technical risk

  • Medium-low, with a few sharp edges.
  • Composite unique index on (issuer, subject) is the main schema risk. Issuer URLs and OIDC sub values are both variable-length strings; on MySQL/MariaDB with utf8mb4, a naive string (255) pair can exceed index byte limits on older row formats, causing the migration to fail on some targets. Verify column lengths and index strategy before shipping to a legacy DB fleet.
  • Concurrent first login can produce a unique-constraint violation (duplicate key) rather than a graceful upsert. Needs a "find-or-create with retry" or upsert path.
  • Issuer drift (IdP tenant migration, e.g. Entra/Auth0/Okta URL changes) silently orphans identity rows and can lock users out or duplicate accounts. There is no mention of an issuer-migration or re-link story.
  • Single-maintainer, community package. The Guzzle pin regression is a warning sign about dependency hygiene and CI coverage across the Laravel support matrix.
  • Release notes say nothing about the security posture of the underlying flow (state/nonce/PKCE, id_token signature verification, JWKS caching) — that is out of scope for this release but remains an unresolved evaluation area.

Key questions

  1. Does the migration define a foreign key to the users table, and is it cascadeOnDelete? What happens to identities when a user is deleted or soft-deleted?
  2. What are the exact column types for issuer and subject, and has the migration been validated on MySQL 5.7 / MariaDB 10.x?
  3. Is the relationship one-to-many (user has many identities) and is the reverse (identity → user) unique enforced at the DB level?
  4. Is linking enforced or advisory — i.e., does login fail if no identity row exists, or is the row created on the fly?
  5. Does enabling the model change the redirect/callback behaviour, or is it purely additive bookkeeping?
  6. Is there a published Laravel 10/11/12 × PHP 8.2/8.3 test matrix in CI?
  7. What is the documented upgrade path from 1.2.0, and are there any config keys renamed?

Integration Approach

Stack fit

  • Laravel 11/12 (now installable), PHP per package constraint, Guzzle ^7.8. Fits applications using a conventional Eloquent User authenticatable. Applications with non-Eloquent or multi-guard setups (separate admin/customer providers) should confirm the trait is provider-agnostic before committing.

Migration path

  1. Bump jeffersongoncalves/laravel-oidc to ^1.3.
  2. composer update and resolve the Guzzle lockfile — expect potential contention with packages still pinning older Guzzle 7 minors.
  3. Run the existing auth flow in a test environment without publishing the migration to confirm zero behavioural change (validates the "optional" claim).
  4. To adopt identity linking: vendor:publish --tag="oidc-migrations", review the generated schema, then migrate.
  5. Add HasOidcIdentities to the Authenticatable model; publish/adjust config/oidc.php if using a non-default table name.
  6. Roll out to staging against a real IdP, then production during a low-traffic window (index creation on a large users table can lock).

Compatibility

  • Verify Guzzle resolution against the rest of the dependency graph — this is the most likely place an upgrade stalls.
  • Confirm the package's declared Laravel constraint actually includes 11 and 12 rather than merely "installs" there.
  • Consumers on Laravel 10 should confirm support is retained, since the release note frames the fix around 11/12.

Sequencing

  • Phase 1: upgrade-only (no migration) — lowest risk, immediately unblocks Laravel 11/12 adoption.
  • Phase 2: schema + trait in staging, identities populated organically by test logins.
  • Phase 3: production enablement, with a decision on whether to backfill existing users via a one-off job that walks known IdP subjects, or rely on lazy population.
  • Phase 4: only after observing real traffic, consider enforcing linkage or adding audit/observability on link events.

Operational Impact

Maintenance

  • New persistent table means a new backup, retention, and PII surface. issuer + subject are stable personal identifiers under GDPR-style regimes — classify accordingly and include the table in data-subject deletion procedures.
  • Configurable table name creates environment drift risk; codify oidc.identities_table in configuration management rather than leaving it implicit.
  • Track the upstream repo for dependency-constraint regressions like the Guzzle pin; consider pinning to a patch range you have tested.

Support

  • On-call needs to distinguish two failure classes: identity-provider failures (misconfigured issuer, JWKS fetch failures, clock skew, redirect URI mismatch) and database failures (duplicate key on concurrent login, index-length migration errors). Only the second is new in this release.
  • Add structured logging around identity creation and lookup so "user cannot log in" tickets can be triaged without reading the package source.

Scaling

  • Negligible. One row per user per IdP; read path is a single indexed lookup on the composite key. This will not be a bottleneck at any realistic user count.
  • The only scale-sensitive moment is the initial migration on a large users table — plan a maintenance window or an online-schema-change tool.

Failure modes

  • Migration aborts on index byte limits (legacy MySQL) → release blocked at deploy.
  • Duplicate-key error on simultaneous first login for the same user → 500 on the callback.
  • Issuer URL change at the IdP → orphaned rows, duplicate accounts, or login denial depending on enforcement mode.
  • Orphaned identity rows after user deletion if no cascade — silently accumulates and can block re-registration if subject reuse is attempted.
  • Trait added to the wrong model (multi-guard apps) → identities written against the wrong authenticatable.

Ramp-up

  • Roughly half a day for a Laravel-competent engineer to read the package and validate the upgrade path; one to two days to productionize including tests, staging verification against a real IdP, and rollback planning.
  • The material unknown is not the new feature but the underlying verification flow, which the release notes do not address. Budget a separate security review pass before treating this package as production-grade for anything beyond internal tooling.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support