我安装了HWIOAuthBundle,登录成功后我想重定向到localhost。 (我已经将apache配置为在localhost上工作)。
因此,登录后不是http://localhost/web/app_dev.php/
,而是转到http://localhost
编辑:
这是我的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
重定向到localhost?
答案 0 :(得分:2)
使用default_target_path: http://localhost/
解决的问题
发布求助解决方案