Automattic / newspack-plugin

An advanced open-source publishing and revenue-generating platform for news organizations.
https://newspack.com
GNU General Public License v2.0
324 stars 48 forks source link

feat(ras-acc): remain on current page after signin via account link #3202

Closed chickenn00dle closed 2 weeks ago

chickenn00dle commented 3 weeks ago

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1207385073694413/1207579795350578/f

This PR updates the redirect behavior of the RAS-ACC account button so that readers remain on the same page they triggered the signin modal when logging in or creating an account:

Screenshot 2024-06-25 at 16 26 50

How to test the changes in this Pull Request:

  1. As a non-logged in reader, navigate to any post
  2. Click the sign in button as pictured above to trigger the auth modal
  3. Create a new account
  4. On epic/ras-acc, you will be redirected to they My Account page. On this branch you will remain on the current page.
  5. Click the my account button (which should have replaced the sign in button pictured above)
  6. Confirm you are redirected to the my account page now.
  7. Log out and repeat the above steps, this time signing into the existing account rather than creating a new one.
  8. Repeat the above steps triggering from various other parts of the site (i.e. Page, Archive, Homepage, etc.)

Other information: