hwi/oauth-bundle
Symfony bundle for OAuth1.0a/OAuth2 login and user authentication. Supports Symfony 6.4–8.0 (PHP 8.3+) and integrates dozens of providers (Google, GitHub, Facebook, Apple, LinkedIn, Azure, Keycloak, etc.).
First you will have to register your application on Google. Check out the documentation for more information: https://developers.google.com/accounts/docs/OAuth2.
Next configure a resource owner of type google with appropriate
client_id, client_secret and scope.
Example scope values include:
emailprofileThey are to be space delimited. Refer to the Google documentation for more information.
# config/packages/hwi_oauth.yaml
hwi_oauth:
resource_owners:
any_name:
type: google
client_id: <client_id>
client_secret: <client_secret>
scope: "email profile"
If you want to use offline access you need to add option
access_type: offline to your configuration.
# config/packages/hwi_oauth.yaml
hwi_oauth:
resource_owners:
any_name:
type: google
client_id: <client_id>
client_secret: <client_secret>
options:
access_type: offline
When you're done. Continue by configuring the security layer or go back to setup more resource owners.
How can I help you explore Laravel packages today?