knpuniversity / oauth2-client-bundle

Easily talk to an OAuth2 server for social functionality in Symfony
https://symfonycasts.com
MIT License
787 stars 146 forks source link

json_login + GoogleAuthenticator #416

Open SecondChance12 opened 1 year ago

SecondChance12 commented 1 year ago

Hi can you help me please I try to use json_login and GoogleAuthenticator

security:
    firewalls:
        api:
            pattern: ^/api
            provider: app_user_provider
            stateless: true
            json_login:
                check_path: /api_sign_in
                username_path: email
                password_path: password
            logout:
                path: /api_logout
                target: /

        main:

            provider: app_user_provider

            entry_point: App\Security\Socials\GoogleAuthenticator
            custom_authenticators:
                - App\Security\Socials\GoogleAuthenticator

But anyway app try to login with Google (Also I try to use all in β€œmain” firewall, not help)

Can you please provide the example how to use it together: json_login for api login and google_authenticator for social login

Thank you πŸ™πŸ»