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

Missed getSessionFromStorage #1210

Closed
molotow11 opened this issue Dec 20, 2022 · 1 comment
Closed

Missed getSessionFromStorage #1210

molotow11 opened this issue Dec 20, 2022 · 1 comment

Comments

@molotow11
Copy link

Issue summary

Can't find a way how to use getSessionFromStorage function how explained here https://github.com/Shopify/shopify-api-js/blob/main/docs/guides/session-storage.md

Expected behavior

Get session object

Actual behavior

Can't find a way how to use it

Steps to reproduce the problem

Try to get session from like with await getSessionFromStorage(sessionId);
In documentation we have this words:
// use sessionId to retrieve session from app's session storage
// getSessionFromStorage() must be provided by application
But, how I can use it?
I've checked shopify-app-session-storage-mongodb I am using, but there is no such function and only loadSession function exists.

Specifications

  • Browser: Chrome
  • Device: PC
  • Operating System: Windows 11
@mkevinosullivan
Copy link
Contributor

getSessionFromStorage() is just an example method name and, as the comment in the guide says, is something that must be provided by the app.

If choosing to use any of the shopify-app-session-storage-* packages, then loadSession is the equivalent actual method provided by those packages, as detailed by the SessionStorage interface.

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