thecolony/oauth2-colony
OAuth2 Colony is a League OAuth 2.0 client provider for authenticating with The Colony. It integrates into PHP and Laravel apps, handling authorization redirects, token exchange, and user retrieval through a simple, framework-friendly API.
league/oauth2-client: authorization URL building, token exchange, discovery document fetch, and id_token signature verification against the provider's JWKS. Writing that from scratch is a week of work you'd mostly spend on the JWKS caching-and-rotation edge cases; adopting it is an afternoon. The honest framing is build cost is low, but not zero — so this is a convenience dependency, not a moat.league/oauth2-client, it slots into the same abstraction you'd use for Google, GitHub, or Microsoft. That supports a roadmap decision — "identity federation as a config-driven feature" rather than "one bespoke login flow per partner."Adopt (or pilot) when:
league/oauth2-client already in the dependency tree (or are willing to add it) and want a single OAuth abstraction across providers.id_token verification — the last of which is the genuinely annoying part to hand-roll (key rotation, caching, kid matching, clock skew).IdentityProvider interface so you can swap to a hand-written provider in a day if maintenance stalls.Look elsewhere when:
jumbojett/openid-connect-php, firebase/php-jwt plus your own discovery logic, or a well-maintained league/oauth2-* provider gives you audited code and a security-response track record this package cannot offer at 1 star and 0 dependents.dependents: 0 will not survive that review, and shouldn't.To executives: This is a small, MIT-licensed integration library that lets us add "Log in with the Colony" in days instead of weeks, and it does the security-sensitive parts (PKCE, signed-token verification against the provider's rotating public keys) the correct way. It's not a strategic bet — it's plumbing, and the whole thing is replaceable at low cost because it's ~a few hundred lines under a permissive license. The caveat is maturity: it's effectively unproven (one star, no downstream users), so my recommendation is a time-boxed pilot behind our own auth interface, version-pinned, with a standing task to re-evaluate or vendor it in 90 days. Decision requested: confirm whether Colony is a partner we actually care about — that answers 90% of this.
To engineering: Thin league/oauth2-client provider implementing the standard flow plus discovery and JWKS id_token verification. Assumes league/oauth2-client is present. Small, readable surface, which means forking is cheap — treat the upstream repo as a reference implementation and be prepared to own it. Wrap it: no direct instantiation in controllers, one internal adapter, one config block, and a test double so our suite doesn't hit the live discovery endpoint. Pin the version; no auto-updates.
How can I help you explore Laravel packages today?