pushinbr / nimbus-socialite
OAuth 2 social login for Nimbus account routes, over league/oauth2-client.
Requires
- php: ^8.4
- league/oauth2-client: ^2.8
- pushinbr/nimbus: ^0.8
Requires (Dev)
- phpunit/phpunit: ^11.5
- pushinbr/arcano: ^0.2.9
- pushinbr/nimbus-redis: ^0.8
Suggests
- league/oauth2-github: GitHub provider.
- league/oauth2-google: Google provider.
- pushinbr/arcano: DatabaseOAuthStateStore, the OAuth state in the application database.
- pushinbr/nimbus-redis: RedisOAuthStateStore, the OAuth state shared by every server.
Provides
None
Conflicts
None
Replaces
None
README
OAuth 2 social login for Nimbus account routes, over league/oauth2-client.
Up to Nimbus 0.7 this code was part of pushinbr/nimbus. From 0.8 the core keeps
only the base framework and the extension points; the social login support lives
here, with the same namespaces, so an application only adds the package.
Start here
Install PAM first (curl -fsSL https://push-in.github.io/pam/install.sh | sh), then
add the package to a Nimbus application:
pam composer require pushinbr/nimbus-socialite
$social = new SocialLogin(['google' => $google], new RedisOAuthStateStore($redis), $users, $tokens); (new AuthRoutes(tokens: $pairs, social: $social))->register($app, '/auth');
Documentation: docs/nimbus/autenticacao.md.
Development
The package is developed in the push-in/pam
monorepo (packages/nimbus-socialite); push-in/nimbus-socialite is a read-only split. Its
tests share the runtime stubs and fixtures of packages/nimbus/tests:
cd packages/nimbus-socialite composer config repositories.monorepo '{"type": "path", "url": "../*", "options": {"symlink": true}}' composer update && composer test
License
Apache-2.0. See LICENSE.