-1

i want to install Hwioauth Bundle in Symfony 4.1. https://github.com/hwi/HWIOAuthBundle.

Installation:

0.6 with support for Symfony >=2.8
0.5 with support for Symfony >=2.3,<4.0
0.4 with support for Symfony >=2.3,<3.0
0.3 with support for Symfony >=2.1,<2.7

I didn't see any installation or document for symfony4.1 here. Only for 3.x version. Anyone can help me. Thanks you.

chinhnguyen
  • 73
  • 1
  • 16

1 Answers1

2

You need use 0.6 release HwiOAuthBundle. My config. On Symfony 4.1

ProjectName/config/hwi_oauth.yaml hwi_oauth: firewall_names: [main] resource_owners: google: type: google client_id: "%env(GOOGLE_CLIENT_ID)%" client_secret: "%env(GOOGLE_CLIENT_SECRET)%" scope: "email profile" options: access_type: offline display: popup

ProjectName/config/security.yaml on main firewall add this

oauth: resource_owners: google: /login/check-google login_path: /login use_forward: false failure_path: /login success_handler: App\Security\Authentication\Handler\AuthenticationSuccessHandler oauth_user_provider: service: App\Security\User\UserProvider

P.S I do not use FOSUserBundle, but if you use it, put it in (oauth_user_provider).