Skip to content

Conversation

katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Oct 7, 2025

Related issues

Proposed Changes

When the user clicks on Create free account link, for example, from Previews tab, they are currently brought to the login screen for Studio and not to the Sign up screen. This PR ensures that they are brought to the sign up screen:

Screenshot 2025-10-07 at 4 56 11 PM

Testing Instructions

  • Pull the changes from this branch
  • Make sure that you are logged out on WP.com and logged out from your account in Studio
  • Navigate to Previews tab
  • Click on Create free account
  • Confirm that you are brought to the sign up page you see on the screenshot

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Oct 7, 2025
@katinthehatsite katinthehatsite marked this pull request as draft October 7, 2025 14:58
@katinthehatsite katinthehatsite requested a review from a team October 8, 2025 11:18
@katinthehatsite katinthehatsite marked this pull request as ready for review October 8, 2025 11:18
Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

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

Thanks Kat for improving this! I have tested it, and I am redirected to the Sign up page when I am logged-out of WordPress.com as expected ✅, but I am redirected to the Log in page when I am logged in to WordPress.com, is that expected?

@katinthehatsite
Copy link
Contributor Author

Thanks Kat for improving this! I have tested it, and I am redirected to the Sign up page when I am logged-out of WordPress.com as expected ✅, but I am redirected to the Log in page when I am logged in to WordPress.com, is that expected?

Let me check, I technically did not make any changes there so it should be the same as trunk for that behaviour 👀

@katinthehatsite
Copy link
Contributor Author

Okay I think I see what you mean: when you are logged in and click that link, it still gives you log in link and when you are logged out, it gives you the Sign up link. But it would give you Sign up link in both cases 🤔

@katinthehatsite
Copy link
Contributor Author

@epeicher I spent some time investigating it and I believe that it is a server-side behaviour from WPCCOM. The Create a free account link still works as expected and redirects you to sign up but WPCCOM seems to detect that you have an account where you are logged in and does the redirect to login. This is also present on trunk so it is not coming from this branch directly.

I checked if we can make this work by detecting where the user is logged-in before determining if the user should be served Login or Signup link when they click on the link to Create a new account but it was a rabbit hole. If you have any ideas, let me know and I would be happy to explore them further 🙇

I also think that this is somewhat of an edge case as usually the users who don't have an account would click that link and not the ones who have an account so I don't expect many users to be affected by that.

@epeicher
Copy link
Contributor

epeicher commented Oct 8, 2025

I checked if we can make this work by detecting where the user is logged-in before determining if the user should be served Login or Signup link when they click on the link to Create a new account but it was a rabbit hole. If you have any ideas, let me know and I would be happy to explore them further 🙇

Ok, I have been having a look how Calypso does it when clicking on Create an account and I have found that it first logs out the user and then the URL you have used works as expected. If required, we could try to do that from Studio but I don't think that is a good approach as it might be annoying to users.

@Marinatsu , @crisbusquets , are you happy with the implemented behaviour? Let me summarise it:

  1. User is logged out of WordPress.com -> User clicks Create a free account in Studio -> User is redirected to Sign up page
  2. User is logged in on WordPress.com -> User clicks Create a free account in Studio -> User is redirected to Sign up page -> WordPress.com redirects the user to Log in page

We could force users navigate to Sign up by logging them out, but I don't think that is a good approach, and at least with this change, the user navigates to Sign up when they are not logged in on WordPress.com.

@katinthehatsite
Copy link
Contributor Author

Ok, I have been having a look how Calypso does it when clicking on Create an account and I have found that it first logs out the user and then the URL you have used works as expected. If required, we could try to do that from Studio but I don't think that is a good approach as it might be annoying to users.

I had a similar experience when reviewing the code and I think this would be a regression in the user experience.

Just to emphasize, I think it is also a bit of an edge case as most of the users who have an account, will use the Log in button 99% of the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants