Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include CSRF token in webapp’s API requests #11

Open
mickmister opened this issue Apr 21, 2020 · 0 comments
Open

Include CSRF token in webapp’s API requests #11

mickmister opened this issue Apr 21, 2020 · 0 comments
Labels
Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/ReactJS Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers

Comments

@mickmister
Copy link
Contributor

When a plugin’s webapp makes an API request to the Mattermost server, it needs to include the CSRF token supplied by the server in its request. This can be done using the getOptions function exported by the mattermost-redux library. Here is some example usage

https://github.com/mattermost/mattermost-plugin-jira/blob/ae5676ead0e9effca29d2948c6596f42cf6e35c1/webapp/src/client/index.js#L13-L18

@hanzei hanzei added Difficulty/1:Easy Easy ticket Help Wanted Community help wanted Tech/ReactJS Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers labels May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/ReactJS Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers
Projects
None yet
Development

No branches or pull requests

4 participants