Getting 401 from the app when switching admin user...

Getting 401 from the app when switching admin user...

pniel-cohen
Shopify Partner
6 0 1

I'm building an app using the Laravel library (php) and it's working fine, excepts for when I'm logging out from the Shopify admin and login with a different user.

When I do that and try to access the app page, it's calling the app's server for getting some data and getting 401. If I'm manually entering the app's login (auth) URL, then it's working again with the logged in user (I guess that the access_token is being renewed).
What's considered to be the best approach for dealing with that? (currently, as a workaround, I'm automatically redirecting to the auth page if the front-end request gets 401, but I prefer doing that on the server side before the page reders).
-- Any idea would be appreciated.

Replies 0 (0)