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

issue 738 - adding back OCAPI session bridge for phased rollouts #739

Conversation

sandragolden
Copy link
Contributor

see issue #738

Description

Steps To Reproduce

  1. start out on pwa, add products to guest cart
  2. cart page redirects to SFRA cart page, session is successfully restored from PWA refresh token
  3. on SFRA login page, click "login" -> returns to PWA for login
  4. login via PWA
  5. return to SFRA cart page. notice that the previous guest dwsid is still set and onSession is never triggered on SFRA, resulting in a cleared guest cart. Customer is not logged in via SFRA.

Expected result

Returning to SFRA after logging in via PWA should maintain session state and cart

Current State:
Notice that returning to SFRA the second time never calls onSession so the dwsid is never set from the logged in refresh token. The old dwsid from the initial session is used, resulting in an empty cart. There's no way to login via SFRA.

current-state-720.mov

Updated State

added-session-bridge-back-720.mov

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Changes

How to Test-Drive This PR

  1. start out on pwa, add products to guest cart
  2. cart page redirects to SFRA cart page, session is successfully restored from PWA refresh token
  3. on SFRA login page, click "login" -> returns to PWA for login
  4. login via PWA
  5. return to SFRA cart page. notice you are correctly logged in and cart is restored.

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@sandragolden sandragolden requested a review from a team as a code owner September 28, 2022 18:16
@echessman echessman requested a review from vcua-mobify October 3, 2022 16:48
@vcua-mobify
Copy link
Contributor

@johnboxall @kevinxh I'd like to get your takes on this change.

To me, the changes proposed in this PR makes sense and it's easier to implement than other options. Since the PWA Kit itself does not have any use for the session bridge, it being commented out by default makes sense. Only users who are setting up a phased launch environment should uncomment it.

If we add this change, we'll want to update our phased launch documentation to include a step to uncomment and enable the session bridge.

@kevinxh
Copy link
Collaborator

kevinxh commented Oct 25, 2022

I believe that once we merge this, we will no longer need to session bridge on the PWA side. cc @shethj

I'll come back to this PR after reviewing this.

@bfeister
Copy link
Collaborator

We are currently on hold due to holiday moratorium for SLAS session bridge work like this.

@bfeister
Copy link
Collaborator

@sandragolden With the SESB (Session Bridging) changes in https://github.com/SalesforceCommerceCloud/plugin_slas/releases/tag/v6.4.0 are we able to close this? cc @shethj @vcua-mobify thoughts?

@sandragolden
Copy link
Contributor Author

@sandragolden With the SESB (Session Bridging) changes in https://github.com/SalesforceCommerceCloud/plugin_slas/releases/tag/v6.4.0 are we able to close this? cc @shethj @vcua-mobify thoughts?

Hi @bfeister, I upgraded to plugin_slas v6.4.1 and can confirm this is still an issue with hybrid deployments. I verified the issue is present in pwa-kit v2.2.0 and v2.6.0. This fix still corrects the issue.

@alexvuong
Copy link
Collaborator

This change has been merged in #1164.

@alexvuong alexvuong closed this May 4, 2023
@sandragolden sandragolden deleted the sgolden/fix-738-session-bridge branch March 25, 2024 23:41
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.

[BUG] Hybrid session not restored after logging in via PWA once dwsid exists
5 participants