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

Reload page when we get a 401 back from bcapp #216

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

jmwiese
Copy link
Contributor

@jmwiese jmwiese commented Oct 1, 2024

Jira: STRF-12520

What/Why?

Starting with this PR we are going to return a 401 Unauthorized response when an AJAX request is made against a preview storefront with an expired preview session.

This PR should trigger a page reload, which should land the user back on the preview code page to re-enter their code.

Rollout/Rollback

Revert this PR

Testing

Locally and in intg

src/lib/request.js Outdated Show resolved Hide resolved
@jmwiese jmwiese force-pushed the STRF-12520 branch 2 times, most recently from 52380d6 to c9e47fb Compare October 1, 2024 17:27
src/lib/request.js Outdated Show resolved Hide resolved
@jmwiese jmwiese force-pushed the STRF-12520 branch 3 times, most recently from 848cb3f to 28084bd Compare October 2, 2024 16:14
@jairo-bc
Copy link
Contributor

jairo-bc commented Oct 2, 2024

LGTM

Copy link

@huntario huntario left a comment

Choose a reason for hiding this comment

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

To test this I deployed the changes on https://github.com/bigcommerce/bigcommerce/pull/60205 and applied these changes on this PR to my copy of Cornerstone.

Screenshot 2024-10-04 at 3 12 22 PM

After waiting 5 minutes, I'm redirected to the preview code screen as expected.

Also tested the checkout process which completed successfully

Screenshot 2024-10-04 at 3 13 30 PM

@jmwiese jmwiese merged commit a908f68 into master Oct 7, 2024
3 checks passed
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.

3 participants