Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.07 KB

1-setting_up_the_bundle.md

File metadata and controls

49 lines (35 loc) · 1.07 KB

Step 1: Setting up the bundle

A) Add HWIOAuthBundle to your project

composer require hwi/oauth-bundle

B) Enable the bundle

Enable the bundle in the kernel:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
    );
}

C) Import the routing

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.

Continue to the next step!

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