composer require hwi/oauth-bundle
Enable the bundle in the kernel:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
);
}
Import the redirect.xml
and login.xml
routing files in your own routing file.
# app/config/routing.yml
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
prefix: /connect
hwi_oauth_login:
resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
prefix: /login
Note:
To prevent strange issues, this route should be imported before your custom ones.
When you're done. Continue by configuring the resource owners you want to use in your application!
Step 2: Configuring resource owners (Facebook, GitHub, Google, Windows Live and others