0

I have successfully installed HWIOAuthBundle. I login to Facebook with this bundle. After a successful login, I get no response. I see a blank screen.

My config file is:

hwi_oauth:
    firewall_name: secured_area
    resource_owners:
        facebook:
            type:          facebook
            client_id:     xxxxxxx
            client_secret: xxxxxxx
            scope:         "email"
            infos_url:     "https://graph.facebook.com/me?fields=id,name,email,picture.type(square)"
            paths:
                email:          email
                profilepicture: picture.data.url    

My Security File is:

security:
    providers:
        hwi:
            id: hwi_oauth.user.provider

    firewalls:
        secured_area:
            anonymous: ~
            oauth:
                resource_owners:
                    facebook:      "/login/check-facebook"
                login_path:        /login
                use_forward:       false
                failure_path:      /login


                oauth_user_provider:
                    service: hwi_oauth.user.provider

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }

My Routing file is:

hwi_oauth_redirect:
    resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
    prefix:   /connect

hwi_oauth_login:
    resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
    prefix:   /login


facebook_login:
    path: /login/check-facebook

google_login:
    path: /login/check-google

custom_login:
    path: /login/check-custom
Chad Nouis
  • 6,861
  • 1
  • 27
  • 28

1 Answers1

0

Try this in your config:

security:
    providers:
        hwi:
            id: hwi_oauth.user.provider

    firewalls:
        secured_area:
            anonymous: ~
            oauth:
                resource_owners:
                    facebook:      "/login/check-facebook"
                login_path:        /login
                use_forward:       false
                failure_path:      /login
                #new line here
                default_target_path: / #or something else /profile etc.

                oauth_user_provider:
                    service: hwi_oauth.user.provider

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
stevenll
  • 1,025
  • 12
  • 29
  • Are you sure you are logging in successfully? Also, have you seen for any alert / critical / anything else in your logs? – stevenll Jul 23 '15 at 10:30
  • you can set the option to the page you want your user to be redirected to after logging in. the `#_=_` comes from facebook. If you look it up there are several js ways to remove it from the url – stevenll Jul 23 '15 at 18:02
  • Quick question: in the developer bar you have the information on which user is currently logged in. Verify that first. Also, I am assuming here, a "blank" page usually occurs when a) you are in prod env and haven't cleaned your prod cache b) you are rendering a blank template – stevenll Jul 24 '15 at 15:10