Isolate Jetpack Onboarding from Jetpack Connect#8414
Merged
Conversation
oskosk
approved these changes
Dec 26, 2017
Contributor
oskosk
left a comment
There was a problem hiding this comment.
Tests well for me, thanks!
Member
Author
|
Thank you @oskosk! |
Contributor
|
@tyxla as discussed on Slack, fresh sites are reaching the authorize screen instead of the onboarding screen with current code in Either test on a really fresh site, or do the following on an unconnected site before following the numbered steps:
|
Member
Author
|
Thanks so much for diagnosing this one! Fix for it is here: #8449 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
As found independently by @ockham and @oskosk and discussed in p1513787687000060-slack-jetpack-onboarding and p1513970123000089-slack-luna, if a user has an onboarding token, this would cause the connection links to contain the
onboarding=TOKENparameter, which would then lead users to a broken JPC flow (because JPO in Calypso is not yet in production).To reproduce the bug:
/wp-admin/admin.php?page=jetpack&action=onboard/wp-admin/admin.php?page=jetpack#/onboarding=TOKENparameter.The reason
Seems like this is caused by some code from the previous JPOalypso attempt, where connection URL was directly used to start the onboarding flow. This is no longer the case, so adding the token parameter must be decoupled from the connection URL method - then users with onboarding tokens will be able to use the connection flow like they did before. This is what this PR does, essentially.
Testing instructions
/wp-admin/admin.php?page=jetpack&action=onboard/wp-admin/admin.php?page=jetpack#/onboarding=TOKENparameter.