How to obtain session token and current session using appbridge in JavaScript?

Hi Shopify team,

We are almost done with our app and in the final stage. But, we are stuck with the steps to get the session token and current session using appbridge in javascript. Please help me to overcome this issue(sharing code snippet will be pretty useful). I tried using cdn hosted version and tried to execute the code from the configured app url from shopify admin within iframe.

Also, there is no SAML support available in shopify as far as i checked. Would like to know if there is any such option available. If so, logging out the user from app when user logs out from shopify will become a smooth process.

One more qn: Is there any way to redirect to app page when the app url is accessed from anywhere else other than app page?

Looking forward to a solution. Thanks in advance.

1 Like