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

Update SLAS private proxy path #1752

Merged
merged 4 commits into from Apr 17, 2024
Merged

Conversation

kevinxh
Copy link
Collaborator

@kevinxh kevinxh commented Apr 17, 2024

Description

I want to propose we change the SLAS Private client proxy path from /mobify/scapi/shopper/auth to /mobify/slas/private.

The reason is that the full path of the existing proxy shows duplicated path segments like /mobify/scapi/shopper/auth/shopper/auth/v1/organizations/f_ecom_zzrf_002/oauth2/token, this may confuse users who think there are something wrong with the duplicated path /shopper/auth/shopper/auth

Also added some loggings to help debug failed proxy requests.

If we agree with this change, i will release a new patch version

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)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

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)

@kevinxh kevinxh requested a review from a team as a code owner April 17, 2024 19:04
Copy link
Contributor

@vcua-mobify vcua-mobify left a comment

Choose a reason for hiding this comment

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

Thanks for making this change @kevinxh

`Please make sure you have enabled the SLAS Private Client Proxy in your ssr.js and set the correct environment variable PWA_KIT_SLAS_CLIENT_SECRET.`
)
console.error(
`SLAS Private Client Proxy Request URL - ${req.protocol}://${req.get(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

log the full proxied request URL, this may help if user have configuration issues.

@@ -176,7 +176,7 @@ class Auth {
constructor(config: AuthConfig) {
// Special endpoint for injecting SLAS private client secret
const baseUrl = config.proxy.split(`/mobify/proxy/api`)[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there is a bug in the waiting here as well. Since the proxy path value is configurable we might run into issues if someone was to change that.

@kevinxh kevinxh merged commit f599410 into release-3.5.x Apr 17, 2024
28 checks passed
@kevinxh kevinxh deleted the update-private-proxy-path branch April 17, 2024 21:02
alexvuong added a commit that referenced this pull request Apr 17, 2024
* fix changelog

* Starting release process for 3.5.0

* Consume latest `commerce-sdk-isomorphic` (#1743)

* bump isomorphic sdk version

* fix param keys

* upgrade to 1.13.1

* Release 3.5.0 - SLAS Private Client Support (#1747)

* bump version to 3.5.0 and update CHANGELOGs

* fix versions and changelogs

* fix lock file versions

* fix package version

* fix package version 2

* use npm on both win and mac platforms

* Revert "use npm on both win and mac platforms"

This reverts commit 63b402f.

* debug ci

* try shell:true

* more shell:true

* Update scripts/check-version.js

Signed-off-by: Kevin He <kevin.he@salesforce.com>

---------

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* add missing param keys for shopper search

* PR feedback

* bump retail app version

* add changelog for retail react app template

* Update SLAS private proxy path (#1752)

* update private path to /mobify/slas/private

* update proxy path and add loggings

* disable private client by default

* bump versions

* update develop with 3.5.2 realease

* update changelog

* update changelog

---------

Signed-off-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
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.

None yet

3 participants