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

[BUG] v3.5 - Duplicate subpath in request to get oauth token #1751

Closed
S3B4S opened this issue Apr 17, 2024 · 1 comment
Closed

[BUG] v3.5 - Duplicate subpath in request to get oauth token #1751

S3B4S opened this issue Apr 17, 2024 · 1 comment

Comments

@S3B4S
Copy link

S3B4S commented Apr 17, 2024

Summary

v3.5 seems to incorrectly generate request urls. This has been brought up in the SFCC slack server, and this issue is being made for visibility's sake and to track the progress.

Steps To Reproduce

Expected result

The network request correctly generates the path http://localhost:3000/shopper/auth/v1/organizations/f_ecom_xxxx_xxx/oauth2/token

Actual result

The network request will return a 404 with the path http://localhost:3000/mobify/scapi/shopper/auth/shopper/auth/v1/organizations/f_ecom_xxxx_xxxx/oauth2/token. Note the duplicate shopper/auth/

System Information (as applicable)

Browser: Arc
Node version: v20.11.1
pwa-kit version: v3.5
Desktop OS: MacOS
Mobile Device Info: N.A.

Additional information

I did some logging myself from the @salesforce/* packages:

privateClientEndpoint: http://localhost:3000/mobify/scapi/shopper/auth

const privateClientEndpoint = `${baseUrl}/mobify/scapi/shopper/auth`

And the proxyRequest path as such:

proxyRequest path: /shopper/auth/v1/organizations/f_ecom_xxxx_xxxx/oauth2/token

https://github.com/SalesforceCommerceCloud/pwa-kit/blob/245e7a8bf6ef11ced9969e4a884f265d8c8de148/packages/pwa-kit-runtime/src/ssr/server/build-remote-server.js

So my guess is that these are being concatenated. I did not dive deeper than this, but I hope it might point people in the right direction.

@vmarta
Copy link
Contributor

vmarta commented Apr 18, 2024

@S3B4S Thanks for reporting this. It's been fixed in the latest release v3.5.1. More details at #1752.

@vmarta vmarta closed this as completed Apr 18, 2024
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

No branches or pull requests

2 participants