Woocommerce-ios: Sign In: Unable to sign in when typing a url that doesn't include www when the actual site URL does

Created on 9 Jul 2019  路  6Comments  路  Source: woocommerce/woocommerce-ios

Describe the bug
On iOS, if you select to log in with the website address and omit www which is present in the website link - the site can鈥檛 be accessed. That鈥檚 not the case with WooCommerce Android App and the same exact website. The behaviour seems to be opposite to https://github.com/woocommerce/woocommerce-android/issues/1218

To Reproduce
Steps to reproduce the behavior:

  1. You'll need a site with a url that starts with www. An example site can be found in 2163851-zen.
  2. In the WooCommerce iOS App, enter the site URL without www (it can start with or without http:// or https:// which I imagine can also have a different result) and you won't be able to access that site.
  3. Same sample site from 2163851-zen can be accessed without www using the Android app.

Screenshots
Screenshot 2019-07-09 at 13 28 53

Expected behavior
Customers will probably be entering their site addresses with and without www, with and without https:// and maybe even with http:// and I'd expect this to work every time. I understand it might be hard to implement since Jetpack Debugger, for example, also works in a similar manner sometimes.

Isolating the problem (mark completed items with an [x]):

  • [X] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • [X] This bug happens with a default WordPress theme active, or Storefront.
  • [X] I can reproduce this bug consistently using the steps above.

Mobile Environment
Please include:

  • Device: iPhone SE
  • iOS version: 12.1.2
  • WooCommerce iOS version: 2.1

WordPress Environment

irrelevant

login on hold bug

All 6 comments

The Authenticator code needs changed. These changes will affect WPiOS and we need to make sure they are okay with changing the functionality in this way.

@mindgraffiti should this issue still be considered high priority? Who do we need to check with to make sure the changes you're proposing are okay on the WPiOS side?

@designsimply yes, it's still a high priority. Sorry, this one is really complex and is taking me a while.

@ScoutHarris this change is going to affect WordPressAuthenticator. I have to change several NSURL methods that pull apart the URL string that the user types into the "Login via SiteURL" view controllers. Do you see any problems for WPiOS users if we allow this logic below?

  1. A user has a site that requires www
  2. The user typed in their site address without the www, such has https://example.com
  3. The API response returns an error
  4. We check the URL and see if it prepended www
  5. Since the URL didn't have www, we add it (https://www.example.com) and make a new API request
  6. If the request returns successful, continue the user through the login flow.

Oh and for added fun, all of the NSURL methods are written in Objective-C.

@designsimply @grigorijurasov FYI this one is being put On Hold. After talking to @astralbodies, the new plan is to move WCiOS to the new login flow that WCAndroid has been using. This bug will be reviewed after the login flow changes happen.

The Login UI was changed recently and I cannot seem to reproduce this issue anymore (WC iOS 5.9).

Was this page helpful?
0 / 5 - 0 ratings