Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concerns about Redis and Middleware #5

Closed
aimproxy opened this issue Jun 15, 2022 · 2 comments
Closed

Concerns about Redis and Middleware #5

aimproxy opened this issue Jun 15, 2022 · 2 comments

Comments

@aimproxy
Copy link

Hi, firstly I want to thank you all for the amazing job done here. I personally wanted to build a non-embedded app and I just started in de middle, I am a bit lost with Shopify Docs, but I am getting ahead thanks to your repo!

I understand that the repo is maintained frequently, due to the last month commit! But there is a matter that I want to discuss with you guys. As you do store your session storage on Redis, I do the same thing. So I was wondering if CustomeSessionStorage could be replaced by RedisSessionStorage?

Another issue, this time addressing the middleware, could Shopify.Utils.loadCurrentSession be used to the job? Instead of going looking for cookies? Isn't that what this function is all about? Correct me if I am wrong!

Thx for your, keep up your amazing work guys!

@carstenlebek
Copy link
Owner

Hi, great to hear, that it helps you.

The custom session storage is needed to initialize the shopify-api package.

Regarding the middleware, the session id is stored in the cookie and the session is directly fetched from the redis db. The reason for this is, that the shopify-api library can't be used in middleware, as the library uses native node functions, which are not supported in middleware.

@aimproxy
Copy link
Author

Hmm, I guess that was the trouble with the fs package that I encounter... Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants