Comments (6)
@websharp have you had any experience of this issue or any ideas what may be causing this?
from magento2-force-login.
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.
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.
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.
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.
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)
- Homepage Redirect After Login Leads To incorrect url HOT 15
- table or view not found HOT 4
- Paypal Ipn HOT 5
- Not compatible with Magento 2.4.0 Commerce HOT 8
- incompatible with community Edition 2.4.0 HOT 1
- Call to undefined method setUrl on Forward class HOT 5
- white list missing Admin Uri HOT 4
- Secondary view problem redirect HOT 2
- Cannot get past /customer/account/loginPost/ when Redirect Customer to Account Dashboard after Logging in is set to "Yes" HOT 1
- 404 present in #180 still present in 4.1.0 HOT 2
- Login as Customer from admin panel HOT 2
- Error while composer require 5.0 HOT 4
- Password Reset Endless redirect HOT 4
- Problem with upgrade: 1061 Duplicate key name 'BITEXPERT_FORCELOGIN_WHITELIST_URL_RULE_STORE_ID' HOT 9
- Circular dependency: Magento\Customer\Model\Plugin\CustomerNotification depends on Magento\Customer\Model\Plugin\CustomerNotification and vice versa. HOT 2
- Exception #0 (Exception): Deprecated Functionality: strpos(): Non-string needles will be interpreted as strings in the future HOT 1
- Restore default whitelist all get static strategy HOT 9
- PHP 8.2 support HOT 1
- A whitelist entry is not editable Error after trying to update the module HOT 2
- Updating PHP version for Magento 2.4.7 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-force-login.