lib.request_auth
Definition:
- lib.request_auth (function callback) :: nil :: Neoloader auth key if successful
Description:
- Allows a plugin to request the auth key, necessary for triggering lib.uninstall and lib.activate. This key is granted to the callback function if the user selects to allow it.
Arguments:
- function callback(key): This function is called if the user selects to give the plugin the auth key
Returns:
- nil: This function does not return anything
- string key: the callback function will be called with a string argument containing the key if the user selects to authenticate the plugin
Other notes:
- Added in LME 3.4.x
- This should be used only in one-off situations or for on-the-fly executed code; for dedicated plugins, changing the plugin's load state to "AUTH" will let it have the auth key when it initially loads. Neoloader's registered management utility will by default also get the auth key, regardless of load state.