Closed mariusa closed 1 year ago
@mariusa There's a non-supported app_template_fastify
branch that should be a Fastify version of the default Node template app. Hopefully that will help.
In terms of your specific question, it's the call to the session.isActive()
method here that compares the configured scopes against the scopes of the session - if they're the same, the processing continues inside the if
clause, if not, it continues beyond the if
clause and redirects through auth again.
(The equivalent line inside the shopify-app-express
package.)
Thanks for session.isActive()
clarification and Fastify template!
Because the node template app is using
shopify-app-express
, it's hard to figure out how using other frameworks (fastify instead of express) should work.eg handling scope changes in template app works almost fine (the old app front-end loads briefly, then user is redirected to approve scope change).
But
grep scope
has no results in template code. How is this handled?Tried to do it in
app.get('/api/auth'
, but that loads inside an iframe andshopify.auth.begin
gets stuck on redirects when app is embedded (works fine for non-embedded)