0.0
No release in over a year
A Gong OAuth2 strategy for OmniAuth 1.x. This allows you to login to Gong with your ruby app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.42

Runtime

 Project Readme

Gem Version

OmniAuth Gong Strategy

Strategy to authenticate with Gong via OAuth2 in OmniAuth.

You can get your OAuth app client id and secret from - https://us-55616.app.gong.io/company/api-authentication

Gong OAuth app docs - https://help.gong.io/hc/en-us/articles/360056677792-Create-an-app-for-Gong

Installation

Add to your Gemfile:

gem 'omniauth-gong'

Then bundle install.

Gong API Setup

Usage

Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :gong,
    Rails.application.credentials.dig(:gong, :client_id),
    Rails.application.credentials.dig(:gong, :client_secret),
    scope: 'api:calls:read:basic'
end

You can now access the OmniAuth Gong URL: /auth/gong

NOTE: While developing your application, if you change the scope in the initializer you will need to restart your app server.

Configuration

You can configure several options, which you pass in to the provider method via a hash:

  • scope: A space-separated list of permissions you want to request from the user.

Here's an example of a possible configuration

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :gong,
    Rails.application.credentials.dig(:gong, :client_id),
    Rails.application.credentials.dig(:gong, :client_secret),
    scope: 'api:calls:read:extensive api:calls:read:media-url'
end

License

See LICENSE