문제

I was looking for possibility where i can give option to customer after password update to end all active sessions related to his account .

It would be helpful if can point in direction (even with a article link)

도움이 되었습니까?

해결책

I've found one post, hope it is helpful for you.

You'll have to create a custom module for that in my opinion. In that module you,

  1. Create a customer attribute login_expiry, whose value is initially null.

  2. Add a new value to the customer_session by calling the \Magento\Customer\Model\Session::setData($name, $value) method, called logged_in_at.

  3. Write an observer for the customer_login event and set the logged_in_at value to the current timestamp.

  4. Whenever user opts for "logout from all devices", set the login_expiry value of that customer to the current timestamp.

  5. Write an observer for the customer_session_init event and there check if the logged_in_at value is less than login_expiry, logout the user.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top