[DO NOT MERGE] POC SCAPI App Server Affinity for PWA Kit v2.x #2036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For a Phased Launch storefront, SCAPI requires each request to contain ECOM
dwsid
insfdc_dwsid
header with each request.To allow PWA Kit to read dwsid from cookies we require the cookie to be set with httpOnly=false.
Plugin SLAS manually sets response cookies and has been setting dwsid with httpOnly=false
We can leverage that cookie to be used in PWA Kit to send with each SCAPI request.
Also,
PWA Kit currently calls OCAPI /sessions which also overrides the dwsid cookie with httpOnly=true.
This PR removes the OCAPI /sessions request as it is no longer required.
See updated SLAS flows for hybrid here:
https://lucid.app/lucidchart/df562464-786e-4e16-9de5-41432a8fa9b8/edit?invitationId=inv_37b0c43d-e2f0-4858-ac5f-19b4ea37360f
Types of Changes
Changes
hasSFRAAuthStateChanged
logic to read access_tokens fromcc-at
cookie and update token in localstorage or call login ifcc-at='refresh'
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization