Add redirect url support to gotConnectedSiteInfo#23
Conversation
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.
There was a problem hiding this comment.
Thanks @AmandaRiu !
I tried to pull Login-lib develop into the branch in WPAndroid and it fails with the following message
iMac:WordPress-Android jirimalina$ git subtree pull --prefix=libs/login git@github.com:wordpress-mobile/WordPress-Login-Flow-Android.git develop --squash
From github.com:wordpress-mobile/WordPress-Login-Flow-Android
* branch develop -> FETCH_HEAD
fatal: ambiguous argument '3b1db07c3872c0935c721f1b5a8e5c4a9eaf9f97^0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
could not rev-parse split hash 3b1db07c3872c0935c721f1b5a8e5c4a9eaf9f97 from commit e3144c2c11b0c982eadb2478cf6926aa40c127e6
Can't squash-merge: 'libs/login' was never added.
If I recall correctly, this is an indication that the branch was created with a buggy version of git (2.20+). Can you please confirm it's the case @aforcier? Thank you!
I've added "request changes" label, just to be sure it's not merged until we clarify this possible issue:).
|
@malinajirka That's interesting. What branch were you using to pull in the |
|
@malinajirka @AmandaRiu yes that is a bad sign 🤔 I too would like to know which branch of WPAndroid you tried @malinajirka - I had tested this branch before and it seemed okay, and I just did these tests with no issue: that works fine. Also tried: I also tried pulling in the branch of this PR instead of Incidentally which version of git are you using @malinajirka ? |
|
Thanks for looking into this. I'm still not sure what is going on 😕. I run the second set of steps yesterday. The first set works as expected. I tried to clone the WPAndroid repo from scratch and I'm still getting the same error :(. It's really weird that it works for both of you and it doesn't work on neither of my laptops 😞. I also tried the following And it worked without any issues 🤷♂ . Any ideas?:) |
|
Just for the record: I had to re-pull amanda's branch ( Here is the complete list of the commands I run in WPAndroid and it worked without any issues So the mystery is resolved and this PR looks good to me. Sorry for the false alarm and thank you again for helping me out! |
…d/1224-amanda-new Add redirect url support to gotConnectedSiteInfo


This PR merges the changes in this WCAndroid PR: woocommerce/woocommerce-android#1224 to support passing the
redirectUrlback to theLoginListener. See the original PR for more information.To Test
I've created a new branch in WPAndroid that includes the changes in this branch, along with any tweaks necessary to support these changes:
amanda/login-lib-redirect-support, and opened a draft PR for testing those changes: wordpress-mobile/WordPress-Android#10232