SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
738 stars 383 forks source link

Grant_type issue while integrating spartacus with CDC #10775

Open rmallick26 opened 3 years ago

rmallick26 commented 3 years ago

Describe the bug While integrating CDC with custom spartacus project, we couldn't do login, as the grant_type is hardcoded in cdc-user-authentication-token.service.ts file. Can we integrate the same way how we are fetching client_id & client_secret. As we aren't able to override the service as well and make the changes for the same. Followed all the steps mentioned in https://sap.github.io/spartacus-docs/cdc-integration/#configuring-spartacus-for-sap-customer-data-cloud-integration Even if I remove all the available grant_type from OAuthClientDetails table for the client_id, and keep only custom, it's still throwing the same error.

Tell us the version of Spartacus

To Reproduce Steps to reproduce the behavior: 1.integrated CDC with spartacus with required APIkey , screenset ID details

  1. try to login
  2. while generating token, it will throw issue as unauthorized grant_type.

Expected behavior The grant_type should be picked based on the authConfig rather than hardcoding the value, similar way how we have implemented client_id and client_secret.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

marlass commented 3 years ago

Worth to do, but it's not super important at the moment.

marlass commented 3 years ago

Idea to implement:

giancorderoortiz commented 3 years ago

@hackergil fyi

SherwinVarghese commented 1 year ago

Is this still relevant?