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

Adds way to redirect user for connect flow #15124

Merged
merged 5 commits into from
Mar 27, 2020

Conversation

ChaosExAnima
Copy link
Contributor

Redirects users back to Calypso if they aren't signed in to WordPress.

Changes proposed in this Pull Request:

  • This adds a query param connect_login_redirect which redirects users that aren't logged in back to Calypso instead of displaying the wp-login screen.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • Updates features. See 1164141197617539-as-1164522491999689.

Testing instructions:

  • On a site with Jetpack installed and active but not connected, log out.
  • Go to wordpress.com/jetpack/connect and enter your site URL.
  • Observe network traffic and verify you are redirected back to Calypso.

Proposed changelog entry for your changes:

  • Improves Jetpack connection flow issues.

Redirects users back to Calypso if they aren't signed in to WordPress.
@ChaosExAnima ChaosExAnima added [Type] Bug When a feature is broken and / or not performing as intended [Status] Proposal Connect Flow Connection banners, buttons, ... labels Mar 25, 2020
@ChaosExAnima ChaosExAnima requested a review from a team as a code owner March 25, 2020 21:38
@ChaosExAnima ChaosExAnima self-assigned this Mar 25, 2020
@jetpackbot
Copy link

jetpackbot commented Mar 25, 2020

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: April 7, 2020.
Scheduled code freeze: March 31, 2020

Generated by 🚫 dangerJS against 0d46a7b

class.jetpack.php Outdated Show resolved Hide resolved
class.jetpack.php Outdated Show resolved Hide resolved
@jeherve jeherve added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Mar 26, 2020
@ChaosExAnima ChaosExAnima added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Mar 26, 2020
@ChaosExAnima ChaosExAnima requested a review from enejb March 26, 2020 16:09
enejb
enejb previously approved these changes Mar 26, 2020
Copy link
Member

@enejb enejb left a comment

Choose a reason for hiding this comment

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

Thanks for making this work. I think this is a great fix!

@ChaosExAnima ChaosExAnima added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Mar 26, 2020
@jeherve jeherve added this to the 8.4 milestone Mar 26, 2020
@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Mar 26, 2020
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

While it does work on regular WP installs, it does not seem to work when your installation of WordPress is installed in a subdirectory:
https://wordpress.org/support/article/giving-wordpress-its-own-directory/

I'll send you credentials with a site that is set up like that if that can help with debugging.

I also wonder if it may be worth adding unit tests for this. What do you think?

class.jetpack.php Show resolved Hide resolved
@ChaosExAnima
Copy link
Contributor Author

@jeherve - I've added unit tests as per requested. As for subdirectory installs, as discussed that seems to be a separate issue. I've made a ticket for that in 1164141197617539-as-a168534075008073.

@ChaosExAnima ChaosExAnima added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Mar 26, 2020
jeherve
jeherve previously approved these changes Mar 27, 2020
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

Looking good now. 🚢

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Mar 27, 2020
@ChaosExAnima
Copy link
Contributor Author

@jeherve - issue with a test made me push another fix. Can you re-review real quick?

@ChaosExAnima ChaosExAnima merged commit 7e4bdc2 into master Mar 27, 2020
@ChaosExAnima ChaosExAnima deleted the add/jetpack-login-redirect branch March 27, 2020 17:20
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Mar 27, 2020
@ChaosExAnima
Copy link
Contributor Author

nvm, didn't update :)

jeherve added a commit that referenced this pull request Mar 31, 2020
jeherve added a commit that referenced this pull request Mar 31, 2020
* Initial changelog entry

* Changelog: add #14904

* Changelog: add #14910

* Changelog: add #14913

* Changelog: add #14916

* Changelog: add #14922

* Changelog: add #14924

* Changelog: add #14925

* Changelog: add #14928

* Changelog: add #14840

* Changelog: add #14841

* Changelog: add #14842

* Changelog: add #14826

* Changelog: add #14835

* Changelog: add #14859

* Changelog: add #14884

* Changelog: add #14888

* Changelog: add #14817

* Changelog: add #14814

* Changelog: add #14819

* Changelog;: add #14797

* Changelog: add #14798

* Changelog: add #14802

* Changelog: add #13676

* Changelog: add #13744

* Changelog: add #13777

* Changelog: add #14446

* Changelog: add #14739

* Changelog: add #14770

* Changelog: add #14784

* Changelog: add #14897

* Changelog: add #14898

* Changelog: add #14968

* Changelog: add #14985

* Changelog: add #15044

* Changelog: add #15052

* Update to remove Podcast since it remains in Beta

* Changelog: add #14803

* Changelog: add #15028

* Changelog: add #15065

* Changelog:add #14886

* Changelog: add #15118

* Changelog: add #14990

* Changelog: add #14528

* Changelog: add #15120

* Changelog: add #15126

* Changelog: add #15049

* Chanegelog: add #14852

* Changelog: add #15090

* Changelog: add #15138

* Changelog: add #15124

* Changelog:add #15055

* Changelog: add #15017

* Changelog: add #15109

* Changelog: add #15145

* Changelog:add #15096

* Changelog:add #15153

* Changelog: add #15133

* Changelog: add #14960

* Changelog: add #15127

* Changelog: add #15056

* Copy current changelog to changelog archive.

* Clarify changelog description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Connect Flow Connection banners, buttons, ... [Status] Proposal [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants