jacob-ebey / remix-ecommerce

ABANDONED
505 stars 87 forks source link

[Ecommerce-Provider] New provider needs access to the request / session / cookies #5

Open andrewgadziksonos opened 2 years ago

andrewgadziksonos commented 2 years ago

Hello!

I wanted to discuss potentially changing the type structure of ECommerceProvider so that the session is passed into it. I'm working on POCing with Salesforce Commerce Cloud, and they provider a series of APIs that require the app to generate an access token per session (think guest customers).

image

This API also requires that the app maintain a refresh token, and handle the use case where the access token expires. I wasnt quite sure where to put all of this logic, and it feels like it belongs in the provider implementation.

If there's a better Remix way of doing this, let me know.

jacob-ebey commented 1 year ago

Please check out the Hydrogen project for Remix ecomm best practices. I am not maintaining this and will probably never look at this repo again.