@julian And where is /auth/yourplugin/callback handled? Because in the case of nodebb-plugin-sso-oauth it takes to the homepage of the forum. But i want to change that behaviour and i don't know where or how.
Is there any hook to detect a plugin's uninstallation?
-
If for example, a plugin may insert data into database, then when uninstall this plugin, how could we hook this event so that we could do some data deletions.
-
@jiangcaiyang the problem is, even if there is a hook built in... using ACP is not the only way to uninstall a plugin. You can uninstall it using npm or delete the folder from npm_modules directly. The hook won't be called in those cases.
-
@pichalite My purpose is, if some one follows the official instruction by uninstall it via ACP page, he will get unused old plugins' data deleted automatically ffrom database. Thus reduced the redundant data. The other way however, does not take this action. so the advised way is to use ACP to uninstall it.
-
@jiangcaiyang you can use these hooks for plugin activation, deactivation and uninstall
action:plugin.activate action:plugin.deactivate action:plugin.uninstall