oneofftech/laravel-connect-identity
A Laravel package for connecting external identities to user accounts, simplifying OAuth and third-party authentication flows so apps can link, verify, and manage social or service-based logins with less boilerplate.
composer require oneofftech/laravel-connect-identity and confirm you land on ^0.6. This release's headline change is Laravel 13 compatibility, so pair it with a Laravel 13 app (and the PHP version Laravel 13 requires — check the composer.json php constraint before upgrading an older runtime).php artisan vendor:publish --tag=connect-identity-config (check php artisan vendor:publish output for the exact tag). Everything you need to get a login working — client credentials, issuer/discovery URL, scopes, redirect route — lives there.users record is created or matched. If that loop works, everything else is configuration..env (APP_URL, session driver, and the client id/secret/issuer keys the config expects) before your first attempt — most first-run failures are misconfiguration, not bugs.config/auth.php, add a connect (or similarly named) guard, and use Auth::guard('connect') / auth:connect middleware on the routes you want protected. This keeps the package from colliding with your existing session guard.web middleware group — the OAuth state parameter is stored in the session, so api-only middleware will break the round trip.App\Models\User. Prefer keying on the subject claim (sub) stored in a dedicated column over matching by email. Email matching is convenient for existing user tables but breaks the moment someone's email changes at the IdP or two identities share an address.Http::fake() for the token and userinfo/JWKS endpoints and assert the redirect → callback → authenticated state. For everything downstream of login, actingAs($user, 'connect') avoids hitting the IdP entirely. Keep one integration test that exercises the real callback path with a faked token response.^0.6 and read the changelog before each minor update. The v0.6.0 diff is small (Laravel 13 support only), but the same won't be true of every release.composer update, diff your published config against the package's stub (vendor/oneofftech/laravel-connect-identity/config/...). Re-publishing with --force will overwrite your environment-specific values. Also re-run your test suite against Laravel 13 — framework-level deprecations, not this package, are the likely source of breakage.TrustProxies correctly or the generated URL will be http:// while the IdP expects https://.invalid_state, missing session) usually mean: session driver misconfigured across multiple app servers, cookie domain mismatch, or the callback route outside the web group. Use a shared session store (Redis/DB) in any multi-node setup.SameSite=Lax is what you want on the session cookie; Strict will drop the session and break state validation.error/error_description from the IdP's redirect query string — the package's exception message is usually a paraphrase of it.How can I help you explore Laravel packages today?