File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
packages/template-retail-react-app/app/commerce-api Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ export default function useCustomer() {
9090 * @param {string } credentials.password
9191 */
9292 async login ( credentials ) {
93- if ( api . auth . pendingToken ) {
94- await api . auth . pendingToken
95- }
93+ await api . auth . ready ( )
9694 let skeletonCustomer = getSkeletonCustomer ( )
9795 if ( credentials ) {
9896 await login . mutateAsync ( {
@@ -118,7 +116,7 @@ export default function useCustomer() {
118116 */
119117 async logout ( ) {
120118 await logout . mutateAsync ( )
121- await this . login ( )
119+ await api . auth . ready ( )
122120 const skeletonCustomer = getSkeletonCustomer ( )
123121 setCustomer ( skeletonCustomer )
124122 } ,
Original file line number Diff line number Diff line change @@ -161,10 +161,6 @@ class CommerceAPI {
161161 ...fetchOptions ?. parameters
162162 }
163163
164- if ( self . auth . pendingToken ) {
165- await self . auth . pendingToken
166- }
167-
168164 // Handle auth logic (replacing willSendRequest functionality)
169165 let dwsidHeader = { }
170166 const dwsid = self . auth . get ( 'dwsid' )
You can’t perform that action at this time.
0 commit comments