Shopify/shopify_app — pull request #26 by gauravmc (2012-09-01 13:31:02+00:00)
Title: Handle UnauthorizedAccess if app is uninstalled

If a shop owner uninstalls the app and later visits the app home page again (to reinstall it for example), it throws a 401. It's because the shop is still in the session with its old token. It leaves the shop owner with no option other than resetting browser cookies or manually visiting `/login/logout` path for the app.

This just handles the `ActiveResource::UnauthorizedAccess` and takes the user to the app's `root_path` as expected. Already tested it on my app.

@edward this seems fine?