Skip to content

[cookbook/csrf_in_login_form] Confusion around csrf_token_generator and csrf_provider for form_login #6194

Closed
@gbalcewicz

Description

@gbalcewicz

In the docs for 2.7 under the form_login is csrf_token_generator. In docs for 2.8 there is a note that csrf_token_generator was introduced in 2.4. In docs for 2.6 there is csrf_provider.

When using csrf_token_generator in symfony 2.7 we are getting exception:

InvalidConfigurationException in ArrayNode.php line 309: Unrecognized option "csrf_token_generator" under "security.firewalls.main.form_login"

Moreover in the docs for FosUserBundle there is a comment in yml

# if you are using Symfony < 2.8, use the following config instead:
# csrf_provider: form.csrf_provider

It confuses a lot. I assume that csrf_token_generator was introduced in 2.8. Is that right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    SecurityactionableClear and specific issues ready for anyone to take them.bughasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions