https://github.com/geodoo/add-to-slack-button
Custom Web Component to display your Add to Slack button profile as a widget on your website or web app
https://github.com/geodoo/add-to-slack-button
oauth slack-api webcomponents
Last synced: 5 months ago
JSON representation
Custom Web Component to display your Add to Slack button profile as a widget on your website or web app
- Host: GitHub
- URL: https://github.com/geodoo/add-to-slack-button
- Owner: GeoDoo
- License: mit
- Created: 2020-09-26T22:32:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:50:13.000Z (over 3 years ago)
- Last Synced: 2024-05-16T01:11:12.135Z (about 2 years ago)
- Topics: oauth, slack-api, webcomponents
- Language: JavaScript
- Homepage:
- Size: 1.11 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.webcomponents.org/element/add-to-slack-button)
# \
This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
## Installation
```bash
npm i add-to-slack-button
```
## Usage
This component is supposed to be used when you have an app that needs to generate an OAuth 2.0 dynamic install URL. The limitation of this package is that you will need to expose this URL to an endpoint (within your app or separate API?) in this form:
```json
{
"installUrl": ""
}
```
More info about OAuth in [The OAuth Flow](https://api.slack.com/legacy/oauth#authenticating-users-with-oauth__the-oauth-flow)
```html
import "add-to-slack-button/add-to-slack-button.js";
```
If you want to use it for your website, you can also do the following:
```html
```
## Live demo
You can check the Add to Slack button on the sidebar of my blog: https://geodoo.work
## Tooling configs
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
If you customize the configuration a lot, you can consider moving them to individual files.
## Local Demo with `es-dev-server`
```bash
npm start
```
To run a local development server that serves the basic demo located in `demo/index.html`