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

Hide the top bar “Sign Up” button for OAuth flow #98559

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions client/layout/masterbar/logged-out.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ class MasterbarLoggedOut extends Component {
return null;
}

/**
* Hide signup for OAuth flow (it doesn't correctly route the arugments)
*/
if ( currentQuery?.client_id !== null && currentQuery?.redirect_to != null ) {
Copy link
Member

Choose a reason for hiding this comment

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

I suppose this presumes that any request with client_id and redirect_to—whether it is the WordPress/Jetpack mobile app or otherwise—should no longer display this "Sign up" button. I don't perceive that to be a problem given the button does not pass along the redirect destination and, thus, creates the odd UX we hope to avoid with this change. 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I figured I'd fix this for other clients at the same time.

If this somehow is a regression for someone, we can scope it more tightly to just the client IDs we care about

return null;
}

/**
* Hide signup from the screen when we have been sent to the login page from a redirect
* by a service provider to authorize a Domain Connect template application.
Expand Down
Loading