FOSOAuthServerBundle icon indicating copy to clipboard operation
FOSOAuthServerBundle copied to clipboard

How to setup authentication for auth path

Open phtmgt opened this issue 8 years ago • 1 comments

Ok, so I googled and tried to figure out how to 'Add your favorite authentication process here' with no success. Whenever I try to add some form_login there, it tells me the patterns don't match.

oauth_authorize:
            pattern:    ^/oauth/v2/auth
            # Add your favorite authentication process here
...

Ideally I want to use google login through HWIOauthBundle there. My current configuration uses the regular login form from my main firewall and this is not ideal.

Any suggestions appreciated.

Thanks.

phtmgt avatar Dec 29 '17 15:12 phtmgt

I was able to use form_login like so:

        oauth_authorize:
            pattern:    ^/oauth/v2/auth
            form_login:
                provider: fos_userbundle
                check_path: /oauth/v2/auth_login
                login_path: /oauth/v2/auth_login

Would this work for you?

dinamic avatar Jan 26 '18 11:01 dinamic