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

Remove references to session bridging #684

Merged
merged 4 commits into from
Aug 6, 2022

Conversation

johnboxall
Copy link
Collaborator

When working alongside SFRA or SG, there is no need to the PWA to "session bridge":

  1. If a shopper arrives on SFRA/SG, they get a DW SID and refresh token. When they switch to the PWA, we use the refresh token to grab a SLAS JWT for them.
  2. If a shopper lands on PWA, they get a refresh token. When they switch to SFRA/SG, we use the refresh token to grab a SLAS JWT for them.

The only reason you may need to session bridge in the PWA is if you are calling controllers that require DW SID.

If we wanted to truly support this, this code would need additional guards for if you already have a DW SID.

This is unneeded with `plugin_slas`.
@johnboxall johnboxall requested a review from a team as a code owner July 29, 2022 19:38
Copy link
Collaborator

@alexvuong alexvuong left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinxh kevinxh merged commit be6c1c5 into develop Aug 6, 2022
@kevinxh kevinxh deleted the remove-references-to-session-bridging branch August 6, 2022 00:01
@sandragolden
Copy link
Contributor

sandragolden commented Sep 28, 2022

@johnboxall This has broken my hybrid POC.

steps to reproduce:

  1. start out on pwa, add products to guest cart
  2. cart redirects to SFRA cart page, session is successfully restored from PWA refresh token
  3. click "login" -> returns to PWA
  4. login on 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.

I've created #738 for this. For now, adding back this code has resolved the issue.

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.

4 participants