Skip to content

Send redirectUrl to listener and strip protocol before saving#1224

Merged
0nko merged 2 commits intodevelopfrom
amanda/1218_login_www
Jul 10, 2019
Merged

Send redirectUrl to listener and strip protocol before saving#1224
0nko merged 2 commits intodevelopfrom
amanda/1218_login_www

Conversation

@AmandaRiu
Copy link
Copy Markdown
Contributor

Fixes #1218 by using the redirect url when available instead of the entered url for matching the site to the authenticated user.

If the url the user logs in with is redirected, we want to know the redirect url and use that for the rest of the login process. We save this redirect url (or the original url) to AppPrefs with the protocol stripped since it's not needed for the rest of the login process and can cause issues when looking up the site by the url to find a match for the authenticated user.

Some special things to note:
The login process does not care which protocol the user enters (or if any at all). So entering www.droidtester2018.com, droidtester2018.com, http://www.droidtester2018.com or https://droidtester2018.com will all be handled identically. Here are examples:

Examples

prepending with www:

prepending with http://www:

prepending with https://

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

If the url the user logs in with is redirected, we want to know the
redirect url and use that for login. We save this url (or the original
url) to app prefs with the protocol stripped since it's not needed
for the rest of the login process and can cause issues when looking
up the site by the url.
@AmandaRiu AmandaRiu added the Login label Jul 9, 2019
@AmandaRiu AmandaRiu added this to the 2.3 milestone Jul 9, 2019
@peril-woocommerce
Copy link
Copy Markdown

Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout amanda/1218_login_www
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/1224
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/1224 and open a new PR.

Generated by 🚫 dangerJS

@0nko 0nko self-assigned this Jul 9, 2019
@peril-woocommerce
Copy link
Copy Markdown

Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout amanda/1218_login_www
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/1224
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/1224 and open a new PR.

Generated by 🚫 dangerJS

Copy link
Copy Markdown
Contributor

@0nko 0nko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@0nko 0nko merged commit dfbb0ae into develop Jul 10, 2019
@0nko 0nko deleted the amanda/1218_login_www branch July 10, 2019 20:05
@AmandaRiu AmandaRiu restored the amanda/1218_login_www branch July 16, 2019 03:47
@AmandaRiu AmandaRiu deleted the amanda/1218_login_www branch October 18, 2019 01:56
@designsimply designsimply added feature: login Related to any part of the log in or sign in flow, or authentication. and removed Login labels May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: login Related to any part of the log in or sign in flow, or authentication.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sign In: Unable to sign in when typing a url that includes www.

3 participants