@webbio/strapi-plugin-userback

1.0.1 • Public • Published

Strapi plugin Userback

This Strapi plugin enables Userback feedback widget on your Strapi admin panel.

UserBack token

NOTE: If the project based token does not work -> construct the UserBack token from the Account ID, the Project ID and the Global Access Token (without the A- part).

# account_id|project_id|global_access_token_without_A_dash
USERBACK_TOKEN='12345|12345|123ABC0ABC12345ABCDEF12AB'

You can find the the account_id and project_id by inspecting the project page with the DevTools. Look for the response from the https://app.userback.io/NLI/dashboard/?_xhr=app_getData call in the "Network" tab. Use the cmd/ctrl+f search tool and search for the project name.

Plugin Config

To enable this plugin. Add it to plugins.ts

userback: {
  enabled: true,
  config: PluginConfig
}

// alternative
userback: {
    enabled: true,
    config: {
      token: env("USERBACK_TOKEN"),
    },
  },

Config type:

type PluginConfig = {
	token?: string; // Secret token for the plugin
};

Important

  • To make the script work correctly, make sure you add the 'https://api.userback.io' and 'https://static.userback.io' script-src directives to your middlewares strapi::security config. Example:
export default ({ env }) => [
	// ...
	{
		name: 'strapi::security',
		config: {
			contentSecurityPolicy: {
				// ...
				directives: {
					// ...
					'script-src': [
						// ...
						'https://api.userback.io', 'https://static.userback.io'
						// ...
					],
					// ...
					upgradeInsecureRequests: null
				}
			}
		}
	}
	// ...
];

Readme

Keywords

none

Package Sidebar

Install

npm i @webbio/strapi-plugin-userback

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

140 kB

Total Files

72

Last publish

Collaborators

  • joerismits
  • martijn-webbio
  • hayedewit
  • maikelm
  • mikewebbio
  • smdehaas
  • tomwebbio
  • fred-webbio
  • jaapwebbio
  • rowanpaul