-
Notifications
You must be signed in to change notification settings - Fork 135
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
@W-14455649@ - DO NOT MERGE - Spike slas private client v2 #1585
Changes from all commits
2e7d824
d4a6f31
7632c1e
4ba2b8c
04ffa7d
75f1022
3da5b7c
cbda6ee
e2daa02
087d1ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ type Helpers = typeof helpers | |
interface AuthConfig extends ApiClientConfigParams { | ||
redirectURI: string | ||
proxy: string | ||
slasProxy: string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are setting up a new proxy in ssr.js to insert the client secret. This new |
||
fetchOptions?: ShopperLoginTypes.FetchOptions | ||
fetchedToken?: string | ||
OCAPISessionsURL?: string | ||
|
@@ -168,7 +169,7 @@ class Auth { | |
|
||
constructor(config: AuthConfig) { | ||
this.client = new ShopperLogin({ | ||
proxy: config.proxy, | ||
proxy: config.slasProxy, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the regular |
||
parameters: { | ||
clientId: config.clientId, | ||
organizationId: config.organizationId, | ||
|
@@ -405,7 +406,8 @@ class Auth { | |
} | ||
} | ||
return await this.queueRequest( | ||
() => helpers.loginGuestUser(this.client, {redirectURI: this.redirectURI}), | ||
//() => helpers.loginGuestUser(this.client, {redirectURI: this.redirectURI}), | ||
() => helpers.loginGuestUserPrivateClient(this.client,{redirectURI: this.redirectURI}), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This consumes a change made in commerce-sdk-isomorphic to skip the |
||
true | ||
) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ export const DEFAULT_TEST_HOST = 'http://localhost:8888' | |
|
||
export const DEFAULT_TEST_CONFIG = { | ||
proxy: `${DEFAULT_TEST_HOST}/mobify/proxy/api`, | ||
slasProxy: `${DEFAULT_TEST_HOST}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is how I am consuming the new proxy set in ssr.js. As mentioned in other comments, it is currently separate from |
||
redirectURI: `${DEFAULT_TEST_HOST}/callback`, | ||
clientId: '12345678-1234-1234-1234-123412341234', | ||
organizationId: 'f_ecom_zzrmy_orgf_001', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs the changes in SalesforceCommerceCloud/commerce-sdk-isomorphic#138 to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI if anyone wants to run this PR locally, you'll need to update this line to point to your own copy of
commerce-sdk-isomorphic
. Specifically, pull in the PR: SalesforceCommerceCloud/commerce-sdk-isomorphic#138.Also, in your copy of
commerce-sdk-isomorphic
, build it first by running: