Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send redirectUrl to listener and strip protocol before saving #1224

Merged
merged 2 commits into from
Jul 10, 2019

Conversation

AmandaRiu
Copy link
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
@AmandaRiu AmandaRiu added this to In progress in Kanban Board (Deprecated) via automation Jul 9, 2019
@peril-woocommerce
Copy link

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

@AmandaRiu AmandaRiu moved this from In progress to Review / Testing in Kanban Board (Deprecated) Jul 9, 2019
@0nko 0nko self-assigned this Jul 9, 2019
@peril-woocommerce
Copy link

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
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
Kanban Board (Deprecated) automation moved this from Review / Testing to Done/Merged 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
No open projects
Kanban Board (Deprecated)
  
Shipped in 2.3
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