feat: Linear OAuth 2.0 (#10851)
Fixes https://linear.app/chatwoot/issue/CW-3417/oauth-20-authentication We are planning to publish the Chatwoot app in the Linear [integration list](https://linear.app/docs/integration-directory). While we currently use token-based authentication, Linear recommends OAuth2 authentication. This PR implements OAuth2 support. --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
@@ -59,26 +59,9 @@ linear:
|
||||
id: linear
|
||||
logo: linear.png
|
||||
i18n_key: linear
|
||||
action: /linear
|
||||
action: https://linear.app/oauth/authorize
|
||||
hook_type: account
|
||||
allow_multiple_hooks: false
|
||||
settings_json_schema:
|
||||
{
|
||||
'type': 'object',
|
||||
'properties': { 'api_key': { 'type': 'string' } },
|
||||
'required': ['api_key'],
|
||||
'additionalProperties': false,
|
||||
}
|
||||
settings_form_schema:
|
||||
[
|
||||
{
|
||||
'label': 'API Key',
|
||||
'type': 'text',
|
||||
'name': 'api_key',
|
||||
'validation': 'required',
|
||||
},
|
||||
]
|
||||
visible_properties: []
|
||||
slack:
|
||||
id: slack
|
||||
logo: slack.png
|
||||
|
||||
@@ -233,6 +233,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
resource :linear, controller: 'linear', only: [] do
|
||||
collection do
|
||||
delete :destroy
|
||||
get :teams
|
||||
get :team_entities
|
||||
post :create_issue
|
||||
@@ -444,6 +445,10 @@ Rails.application.routes.draw do
|
||||
resource :callback, only: [:show]
|
||||
end
|
||||
|
||||
namespace :linear do
|
||||
resource :callback, only: [:show]
|
||||
end
|
||||
|
||||
namespace :twilio do
|
||||
resources :callback, only: [:create]
|
||||
resources :delivery_status, only: [:create]
|
||||
|
||||
Reference in New Issue
Block a user