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
Openid Connect

Openid Connect Laravel Package

itk-dev/openid-connect

OpenID Connect authentication for Laravel applications. Handles the authorization code flow, discovery, token exchange and validation, userinfo retrieval, and login/logout routes, with configuration via environment variables so apps can integrate an OIDC identity provider quickly.

View on GitHub
Deep Wiki
Context7

A Laravel package for adding OpenID Connect (OIDC) authentication to your application. It simplifies configuring OIDC providers, redirecting users to the identity provider, handling callbacks, and authenticating users from standard claims.

  • OIDC discovery and flexible provider configuration
  • Authorization Code flow with PKCE support
  • ID token validation and userinfo retrieval
  • Laravel guard and user integration
  • Configurable routes, middleware, and login behavior
Frequently asked questions about Openid Connect
How do I install itk-dev/openid-connect in a Laravel application?
Install the package with Composer by running composer require itk-dev/openid-connect. Then follow the package README to publish any configuration and add your OpenID Connect provider settings. Check whether the package requires migrations or middleware registration for your Laravel version. After configuration, test the login redirect and callback routes in a non-production environment.
How does this package use the OpenID Connect Discovery document?
The package configures OpenID Connect by reading the provider's discovery document, which contains endpoints and metadata such as authorization, token, userinfo, and logout URLs. You typically provide the issuer or discovery URL in configuration instead of hardcoding every endpoint. This keeps configuration aligned with the identity provider. Review the README for the exact configuration keys and any caching options.
Does itk-dev/openid-connect support the OIDC authorization code flow?
Yes, the package is described as supporting the authorization code flow for OpenID Connect login. Your Laravel app redirects the user to the identity provider, handles the callback, and completes the login flow. You then use the package middleware or helpers to require authentication on protected routes. Confirm any PKCE or client secret requirements in the README and provider settings.
Can I configure multiple OpenID Connect providers with this Laravel package?
The package advertises configurable providers, so it is intended for apps that need to define OpenID Connect provider settings rather than a single hardcoded integration. You can usually define provider-specific configuration and select the appropriate provider for your login routes or guards. Check the README for the supported multi-provider configuration shape. Test each provider's discovery, callback, and logout behavior separately.
How do I retrieve userinfo and map OIDC claims to a Laravel user?
The package includes userinfo retrieval as part of the OpenID Connect flow, so after a successful login you can access claims returned by the provider. Use those claims to find or create a local Laravel user and store the authentication state according to your app's design. The exact mapping depends on your provider's claims and the package configuration. See the README for hooks or customization points before writing custom logic.
Does itk-dev/openid-connect support logout?
Yes, logout support is part of the package's described feature set. You can clear the local Laravel session and, where the provider supports it, redirect to the provider's end-session endpoint. The discovery document may supply the logout endpoint, so check how the package exposes that configuration. Test both local and provider-side logout behavior with your identity provider.
How do I protect Laravel routes with the package middleware?
The package provides middleware and helpers for integrating external identity providers, so you apply its authentication middleware to routes or route groups that require OIDC login. Unauthenticated users are redirected into the OpenID Connect flow, and successful logins return to your callback route. Register or alias the middleware as instructed in the README. Then verify that public routes remain accessible and protected routes enforce authentication.
Which Laravel and PHP versions does itk-dev/openid-connect support?
The exact Laravel and PHP version constraints are defined in the package's composer.json and should be checked before installation. The package is aimed at Laravel applications, but supported versions can change between releases. Review the README, Packagist metadata, and release notes for the current compatibility matrix. If you are on an older Laravel version, confirm support before adding it to production.
How can I test OpenID Connect login locally with this package?
Point the package configuration at a local or staging OpenID Connect provider, such as a test identity provider, and verify the discovery, callback, userinfo, and logout flows. For automated Laravel tests, mock the discovery and userinfo HTTP responses or use a test provider rather than calling a real external service. Keep test client credentials out of source control. Run the full login flow in a browser at least once before deploying.
What should I check before using itk-dev/openid-connect in production?
Review the repository's release history, open issues, and Composer constraints to confirm the package is actively maintained for your Laravel version. Make sure the discovery document is fetched over HTTPS and that client secrets, session settings, and callback URLs are configured securely. Test login, userinfo, error handling, and logout against the real identity provider in staging. Also decide how you will handle provider metadata changes and package upgrades.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console