我使用这些捆绑包
https://github.com/hwi/HWIOAuthBundle
bundle:JMSI18nRoutingBundle
https://gist.github.com/danvbe/4476697
插入 i18n 后我的路线是
it__RG__hwi_oauth_connect ANY ANY ANY /it/login/
en__RG__hwi_oauth_connect ANY ANY ANY /en/login/
it__RG__hwi_oauth_connect_service ANY ANY ANY /it/login/service/{service}
en__RG__hwi_oauth_connect_service ANY ANY ANY /en/login/service/{service}
it__RG__hwi_oauth_connect_registration ANY ANY ANY /it/login/registration/{key}
en__RG__hwi_oauth_connect_registration ANY ANY ANY /en/login/registration/{key}
it__RG__hwi_oauth_service_redirect ANY ANY ANY /it/login/{service}
en__RG__hwi_oauth_service_redirect ANY ANY ANY /en/login/{service}
it__RG__facebook_login ANY ANY ANY /it/login/check-facebook
en__RG__facebook_login ANY ANY ANY /en/login/check-facebook
it__RG__twitter_login ANY ANY ANY /it/login/check-twitter
en__RG__twitter_login ANY ANY ANY /en/login/check-twitter
但是当我尝试去这里时出现此错误:“/en/login/check-facebook”(或在重定向 facebook 或 twitter 后出现此错误)
No resource owner with name 'check-facebook'.
/app/config/routing.yml
#HWIOAuthBundle routes
hwi_oauth_security:
resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
prefix: /login
hwi_oauth_connect:
resource: "@HWIOAuthBundle/Resources/config/routing/connect.xml"
prefix: /login
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
prefix: /login
facebook_login:
pattern: /login/check-facebook
twitter_login:
pattern: /login/check-twitter