GithubHelp home page GithubHelp logo

Comments (6)

adamj88 avatar adamj88 commented on July 26, 2024

@websharp have you had any experience of this issue or any ideas what may be causing this?

from magento2-force-login.

der-workfloh avatar der-workfloh commented on July 26, 2024

Hi @adamj88 ,

so do you have a custom target url set in the administration? The handling of this is happening in the after login plugin, I need to look it up more to conclude the potential of misconception, but for the moment I am not clear of the cause of the side effect you describe.

from magento2-force-login.

adamj88 avatar adamj88 commented on July 26, 2024

Our target URL is set to customer/account/login.

We debugged it a bit further and round the event customer_session_init (https://github.com/bitExpert/magento2-force-login/blob/master/etc/events.xml#L15), was getting fired twice for some reason, in the first instance as a guest, and in the second as a logged in user.

To work around this we fired the LoginRequiredOnCustomerSessionInitObserver observer on a much earlier event: controller_action_predispatch.

We also injected \Magento\Customer\Model\Session into the observer as well and for the isLoggedIn() method.

I can put together a PR for this if required, but I'm not sure if this was an isolated incident - are you experiencing this too?

from magento2-force-login.

der-workfloh avatar der-workfloh commented on July 26, 2024

Hi @adamj88 ,

I was not able to reproduce this issue. I checked on CE-2.1.7 (clean setup). Do you have any advanced caching systm running like Redis, Memcached or Varnish?

from magento2-force-login.

adamj88 avatar adamj88 commented on July 26, 2024

Hi @websharp

Yes this was both with Varnish & Redis running, I'll push a copy of the work around to a fork when I get chance, see if it makes any sense.

from magento2-force-login.

der-workfloh avatar der-workfloh commented on July 26, 2024

Hi @adamj88 ,

I will close this issue for now, but if you encounter the problem again, feel free to reopen. Maybe you want to try out the new release candidate for v2.3.0 first (https://github.com/bitExpert/magento2-force-login/releases/tag/v2.3.0-RC1).

Best Regards

from magento2-force-login.

Related Issues (20)

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.