mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-04 21:02:35 +08:00
Some checks failed
Frontend Lint & Test / test (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Run Chatwoot CE spec / test (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
22 lines
608 B
Ruby
22 lines
608 B
Ruby
module NotionConcern
|
|
extend ActiveSupport::Concern
|
|
|
|
def notion_client
|
|
app_id = GlobalConfigService.load('NOTION_CLIENT_ID', nil)
|
|
app_secret = GlobalConfigService.load('NOTION_CLIENT_SECRET', nil)
|
|
|
|
::OAuth2::Client.new(app_id, app_secret, {
|
|
site: 'https://api.notion.com',
|
|
authorize_url: 'https://api.notion.com/v1/oauth/authorize',
|
|
token_url: 'https://api.notion.com/v1/oauth/token',
|
|
auth_scheme: :basic_auth
|
|
})
|
|
end
|
|
|
|
private
|
|
|
|
def scope
|
|
''
|
|
end
|
|
end
|