You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on writing a plugin for a platform, but this platform does not use cookies for authentication. Instead, it sets an authentication token inside the browser's local storage. Then for any authenticated API calls, it adds the auth token as a URL query parameter.
Since the current method of plugin authentication relies on cookies, I have no way to extract this token and use in the plugin.
Proposal
Potentially, the configuration could allow for specifying the key name(s) of the desired data to read from the local storage, and then the resulting data is stored in the plugin's config variable, perhaps as config.secrets.<key-name>.
So for example, I could define a configuration as:
The text was updated successfully, but these errors were encountered:
xlash123
changed the title
[Plugin] Allow accessing local storage during authentication
[Plugin] Allow access to local storage during authentication
Jul 29, 2024
This is not the best implementation for storing authentication data and users authentication data would be exposed to the developer of plugin which we are trying to avoid.
It would help also if you mentioned the name of the platform and feel free to discuss stuff like that on https://chat.futo.org/
Use Cases
I am working on writing a plugin for a platform, but this platform does not use cookies for authentication. Instead, it sets an authentication token inside the browser's local storage. Then for any authenticated API calls, it adds the auth token as a URL query parameter.
Since the current method of plugin authentication relies on cookies, I have no way to extract this token and use in the plugin.
Proposal
Potentially, the configuration could allow for specifying the key name(s) of the desired data to read from the local storage, and then the resulting data is stored in the plugin's
config
variable, perhaps asconfig.secrets.<key-name>
.So for example, I could define a configuration as:
And in the plugin code, I could use it as:
References
No response
The text was updated successfully, but these errors were encountered: