1

I would like to add facebook login option to my website. I try to follow this tutorial. But if I add the knpu_guard part under the main section, I get this error:

Unrecognized option "knpu_guard" under "security.firewalls.main"

My firewalls section in the security.yml looks like this:

firewalls:
    main:
        anonymous: ~
        #pattern:    ^/
        provider: our_db_provider
        form_login:
            login_path: login
            check_path: login
        logout:
            path:   /logout
            target: /
        knpu_guard:
            authenticators:
                - app.form_login_authenticator
                - app.api_token_authenticator
                - app.facebook_authenticator
            # by default, use the start() function from FormLoginAuthenticator
            entry_point: app.form_login_authenticator

I just added the knpu_guard section, nothing else changed under the firewalls section

Iter Ator
  • 8,226
  • 20
  • 73
  • 164

1 Answers1

1

I think that the tutorial is a little bit obsolete because knpu_guard is no longer accepted.

You can use guard instead as a key in the security.yml file

Discussion

Try to use this

form_login:
   login_path: login
   check_path: login
   provider: user_provider #where is this provider? It shouldn't be fos_userbundle for example?
anonymous: true
Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171