mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
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>
36 lines
864 B
Ruby
36 lines
864 B
Ruby
FactoryBot.define do
|
|
factory :integrations_hook, class: 'Integrations::Hook' do
|
|
app_id { 'slack' }
|
|
account
|
|
settings { { test: 'test' } }
|
|
status { Integrations::Hook.statuses['enabled'] }
|
|
access_token { SecureRandom.hex }
|
|
reference_id { SecureRandom.hex }
|
|
|
|
trait :dialogflow do
|
|
app_id { 'dialogflow' }
|
|
settings { { project_id: 'test', credentials: {} } }
|
|
end
|
|
|
|
trait :dyte do
|
|
app_id { 'dyte' }
|
|
settings { { api_key: 'api_key', organization_id: 'org_id' } }
|
|
end
|
|
|
|
trait :google_translate do
|
|
app_id { 'google_translate' }
|
|
settings { { project_id: 'test', credentials: {} } }
|
|
end
|
|
|
|
trait :openai do
|
|
app_id { 'openai' }
|
|
settings { { api_key: 'api_key' } }
|
|
end
|
|
|
|
trait :linear do
|
|
app_id { 'linear' }
|
|
access_token { SecureRandom.hex }
|
|
end
|
|
end
|
|
end
|