HWIOAuthBundle:登录后重定向到本地主机

HWIOAuthBundle : Redirecting to localhost after login

我已经安装了 HWIOAuthBundle,登录成功后我想重定向到本地主机。 (我已经将 apache 配置为在 localhost 上工作)。 因此,我喜欢在登录后转到 http://localhost

,而不是 http://localhost/web/app_dev.php/

已编辑:

这是我的 config.yml

hwi_oauth:
http_client:
    verify_peer: false
connect:
    account_connector: my_user_provider
# name of the firewall in which this bundle is active, this setting MUST be set
firewall_name: main
fosub:
    username_iterations: 30
    properties:
        # these properties will be used/redefined later in the custom FOSUBUserProvider service.
        facebook: facebook_id
        google: google_id
        linkedin: linkedin_id
resource_owners:
    facebook:
        type:                facebook
        client_id:           *******
        client_secret:       ******
        scope:               "email"
        paths:
            email:          email
        options:
            display: popup
    google:
        type:                google
        client_id:           *******
        client_secret:       *******
        scope:               "email"

Security.yml

 firewalls:
    dev:
        pattern:  ^/(_(profiler|wdt)|css|images|js)/
        security: false

    main:
        pattern:        ^/
        anonymous:      ~
        provider:       main
        logout: true
        form_login:
            login_path: fos_user_security_login
            check_path: fos_user_security_check
            default_target_path: /localhost
        remember_me:
            key:        %secret%
        oauth:
            resource_owners:
                facebook:           "/login/check-facebook"
                google:             "/login/check-google"
            login_path:        /login
            failure_path:      /login
            default_target_path: my_app_homepage
            oauth_user_provider:
                service: my_user_provider

如何使用 default_target_path 重定向到本地主机?

使用 default_target_path: http://localhost/ 解决了问题 发布解决方案寻求帮助