This was split into 2 helpers: authorizeIDP and loginIDPUser BECAUSE:
The authorizeCustomer returns an auth URL that has to be navigated to from the top level browser in order for the app to be properly redirected to the 3rd party login page and for the user to be able to input their login credentials
Once the 3rd party login is complete, the retail app will call loginIDPUser to exchange the usid and code for an access token
Add apiPaths readonly map to the client template that maps the API names to the API path
In order to implement social login in the PWA Kit and enable this feature for our customers, we need a social login helper in
commerce-sdk-isomorphic
.GUS: W-16543984
Changes
authorizeIDP
andloginIDPUser
BECAUSE:authorizeCustomer
returns an auth URL that has to be navigated to from the top level browser in order for the app to be properly redirected to the 3rd party login page and for the user to be able to input their login credentialsloginIDPUser
to exchange theusid
andcode
for an access tokenapiPaths
readonly map to the client template that maps the API names to the API pathTesting
yarn test
and verify that all tests passE2e test:
token
call is in the Network tab and you see the access token in the response