Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Login not configurable with json_login and form_login #2709

Open
AlexandreKilian opened this issue Jan 12, 2018 · 2 comments
Open

Form Login not configurable with json_login and form_login #2709

AlexandreKilian opened this issue Jan 12, 2018 · 2 comments

Comments

@AlexandreKilian
Copy link

Symfony FOSUserBundle versions:

  • symfony/symfony v3.4.2
  • friendsofsymfony/user-bundle v2.0.2

Description of the problem including expected versus actual behavior:

FOSUserBundle does not work when configuring form login with json as described here.
Configuring json_login for the actual form submission and form_login for the redirect to login causes the check path to redirect to the login_path

Steps to reproduce:

  1. Configure the firewall with json_login for login handling and form_login for redirects when not authenticated
  2. set check_path in json_login
  3. set login_path in form_login
  4. try submitting a login with post and json body to check_path
@stof
Copy link
Member

stof commented Jan 15, 2018

The firewall configuration and the form login implementation are not coming from FOSUserBundle at all, so I don't understand your issue.

FOSUserBundle only provides a controller displaying a login form for convenience (to make it easier to get started with the form_login feature of Symfony) but this controller does nothing except displaying the form for form_login

@AlexandreKilian
Copy link
Author

the issue might be with symfony itself, i don't know...
but when you configure form_login for the symfony redirect and json_login for the auth handling, FOSUserBundle doesn't take the check_path from json_login and complains about it missing from form_login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants