wcpos / electron

Electron Desktop App for WooCommerce POS
5 stars 2 forks source link

the desktop version does not find the users #122

Open ArchiFreeman opened 4 months ago

ArchiFreeman commented 4 months ago

In essence it is the title, the desktop version does not find the users, it finds the page but no user appears to select

aliAbur commented 2 months ago

same here, N I can't login cuz the the application just restart whenever I click on add new user BTW: I'm running macOS on MBA M1

kilbot commented 2 months ago

Hi guys, I think the issue is with javascript being injected into the login form. Can you please try this fix for me?

  1. Using the plugin editor in WP Admin, can you find this file woocommerce-pos/templates/login.php
  2. Remove the do_action('wp_footer'); https://github.com/wcpos/woocommerce-pos/blob/main/templates/login.php#L70
  3. Now try to add a new user in the desktop application
Welsyntoffie commented 1 month ago

Hi I tried this but,

do_action('wp_footer')

This does not exist

I have...

php do_action( 'login_footer' )

kilbot commented 1 month ago

You can try removing php do_action( 'login_footer' ) to see if it fixes the issue, but it might depend on the plugin you are using for 2FA.

Welsyntoffie commented 1 month ago

I did try to delete that line. Still had the same issue of not being able to login a user. So I did add it back just incase it broke something else while using it through a browser.

I do have a 2FA plugin..

All-In-One Security (AIOS) – Security and Firewall

2FA is only enabled for the admin account. The cashier account does not have 2FA enabled.

kilbot commented 1 month ago

The current login screen for the desktop application uses the default WP Login template, so if you have a plugin which changes the default login flow, it can break the POS login.

The solution for this will be to rewrite the login flow for the POS so that it is not effected by other plugins. This is something I want to do, but I'm not sure when it will be on the roadmap.

In the meantime you can use the web application.

Welsyntoffie commented 1 month ago

I see, thank you I will disable the plugin settings 1 by 1 to see which setting is changing the flow

kilbot commented 1 month ago

The auth token lasts for about a week, so you could deactivate the 2FA plugin, login in the POS and then reactivate the 2FA plugin. You should be able to use the POS for about a week before you would have to repeat the process.