App lifecycle events and OAuth access token

Highlighted
Shopify Partner
5 1 1

Hi, 

 

experimenting with creating a shopify app in node and have some issues understanding access tokens and general app lifecycle events.

I have everything working fine with obtaining an offline accesstoken in 

createShopifyAuth / afterauth. But I have noticed that this is invoked every time the app user starts the app from within shopify AND the session is expired. This means a new access token is issued - which one should I use? The first one issued or the latest?
 
Or is there another entry point the first time an app is installed that I should use?
 
thanks,
Peter
 
0 Likes
Highlighted
Shopify Partner
5 1 1

Any ideas on this?

 

thanks

0 Likes