diff --git a/docs/misc/2_setup_oauth/index.mdx b/docs/misc/2_setup_oauth/index.mdx index fe800c17a..6eba02619 100644 --- a/docs/misc/2_setup_oauth/index.mdx +++ b/docs/misc/2_setup_oauth/index.mdx @@ -135,86 +135,6 @@ Superadmin Settings -> Instance Settings -> SSO -> Toggle "gitlab" -> set client You can use other custom OAuths as resources using the "Add OAuth" button in: Superadmin Settings -> Instance Settings -> Resources -> Add OAuth. -## OAuth Resources - -### Slack - -1. Create a new slack app at - -Your app manifest shoud look like this, replacing `` in 2 places. - -```yaml -display_information: - name: Windmill - description: windmill.dev slackbot and oauth integration - background_color: '#3b82f6' - long_description: The Windmill app allows to use command to run jobs inside Windmill as well as receiving message as the Windmill app. The windmill app pairs a slack workspace with a windmill workspace. It must be installed from within the settings of a windmill workspace. -features: - app_home: - home_tab_enabled: true - messages_tab_enabled: true - messages_tab_read_only_enabled: true - bot_user: - display_name: Windmill - always_online: true - slash_commands: - - command: /windmill - url: /api/oauth/slack_command - description: Trigger the script set in your workspace settings for slack - usage_hint: the text that will be passed to the script - should_escape: false -oauth_config: - redirect_urls: - - - scopes: - user: - - chat:write - - admin - - channels:write - bot: - - chat:write - - chat:write.public - - channels:join - - commands -settings: - org_deploy_enabled: false - socket_mode_enabled: false - token_rotation_enabled: false -``` - -1. - -```json -{ - ... - "slack": { - "id": "", - "secret": "" - } -} -``` - -### Custom OAuth - -You can add a completely custom oauth without requiring a dev setup. The item accepts an extra optional field: `connect_config` or `login_config` of type OAuthConfig: - -``` -interface OAuthConfig { - auth_url: string, - token_url: string, - userinfo_url?: string, - scopes?: string[], - extra_params?: Record, - extra_params_callback?: Record, - req_body_auth?: bool -} -``` - -`connect_config` is used for resources, and `login_config` for SSO. - -Once you have validated your custom item, we would be greateful if you could open a PR. See [Contributor's guide](../4_contributing/index.md) for more details. - - ## OAuth Resources ![Setup OAuth](./setup_oauth.png) @@ -285,4 +205,24 @@ Superadmin Settings -> Instance Settings -> Resources -> Toggle "slack" -> set c - Copy the **Client ID** and **Client Secret** from the "OAuth Client" modal. - Superadmin Settings -> Instance Settings -> Resources -> Add OAuth "gsheet" -> set client id and client secret -The same steps apply to enable more APIs (**gmail**, **gdrive**, etc) on your Google Account to set up the resources in Windmill. \ No newline at end of file +The same steps apply to enable more APIs (**Gmail**, **Gdrive**, etc.) on your Google Account to set up the resources in Windmill. + +### Custom OAuth + +You can add a completely custom OAuth without requiring a dev setup. The item accepts an extra optional field: `connect_config` or `login_config` of type OAuthConfig: + +``` +interface OAuthConfig { + auth_url: string, + token_url: string, + userinfo_url?: string, + scopes?: string[], + extra_params?: Record, + extra_params_callback?: Record, + req_body_auth?: bool +} +``` + +`connect_config` is used for resources, and `login_config` for SSO. + +Once you have validated your custom item, we would be greateful if you could open a PR. See [Contributor's guide](../4_contributing/index.md) for more details.