Closed plabadie closed 5 years ago
PR #2524
Apart from the foundation work mentioned in the ticket description, I implemented the userId change in one facade function: the update password.
By default, we intend to use the userId as a default and allow overrides to fall back to using emails.
HOWEVER
Since 1905 isn't released yet, we are going to keep the email as default for now and enable the use of customer Id with the config override,
Right now, by default, you should see the email in the call to the update password endpoint.
http://backendserver/rest/v2/electronics-spa/users/email@domain.com/password?lang=en&curr=USD
Then, you can apply the configuration override with the backend.occ.userIdentifier
property and setting it to customerId
. The storefront is expected to switch to using customerIds in the url
StorefrontModule.withConfig({
backend: {
occ: {
userIdentifier: 'uid',
},
},
})
With the config override, updating the password will be done with an url that looks like:
http://backendserver/rest/v2/electronics-spa/users/e57924e5-cafe-4b58-997d-9d684367cab8/password?lang=en&curr=USD
Won't fix, the solution evolved. See GH-1092.
See master ticket GH-1092
For this to work, we need to :