Git Product home page Git Product logo

Comments (8)

RapotOR avatar RapotOR commented on September 24, 2024

Thanks for reporting!

I also have an application with both FOSUserBundle & ConsoleBundle.

You have overwritten templates in Resources/views/, right? Could you show me this?
The ConsoleBundle is injecting html code before </body>; as WebProfilerBundle does.

I will have a look deeply at this when you have provided me some code.

from consolebundle.

DeluxZ avatar DeluxZ commented on September 24, 2024

In my UserBundle(.php) I have

    public function getParent()
    {
             return 'FOSUserBundle';
    }

So I can have the twig files in my bundle instead of in app/Resources, now I have my login.html.twig in my UserBundle/Resources/views/Security.

It's also in the docs https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md at b) Create A Child Bundle And Override Template

from consolebundle.

stof avatar stof commented on September 24, 2024

This is not about FOSUserBundle or another way to render a login form. It is simply that the AJAX url of ConsoleBundle is matched by your firewall and requires being authenticated, and so the AJAX request will return a login form instead of the console.
Btw, if you want a third login form, you can have it by forcing the web debug toolbar to be authenticated too 😁 Avoiding it is the reason why the SE defines a dev friewall disabling security for the WDT and the profiler

from consolebundle.

RapotOR avatar RapotOR commented on September 24, 2024

@stof Thanks for intervention, I was assuming he followed instructions.

@DeluxZ

  # app/config/security.yml
  security:
      firewalls:
         sf2gen:
             pattern:    /_sf2gencdt/.*
             security:  false

from consolebundle.

stof avatar stof commented on September 24, 2024

@RapotOR Gold rule when debugging a user issue: never assume I followed the doc :)

from consolebundle.

DeluxZ avatar DeluxZ commented on September 24, 2024

@RapotOR I have followed the instructions. http://pastebin.com/veJxP072 is my security.yml

from consolebundle.

stof avatar stof commented on September 24, 2024

@DeluxZ you need to put it before your catch-all firewall otherwise it will never be used. Firewalls are tried in the order in which they are defined until one has a matching pattern. As you main firewall catches everything, any firewall defined after it is simply a dead one

from consolebundle.

DeluxZ avatar DeluxZ commented on September 24, 2024

@stof Thanks, that was the problem.

One more question. When I want to login, it redirects to /_sf2gencdt/ instead of the home url

from consolebundle.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.