Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

omniauth-salesforce-modern

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omniauth-salesforce-modern

  • 1.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OmniAuth Salesforce Strategy

Strategy to authenticate with Gong via OAuth2 in OmniAuth.

Salesforce OAuth docs - https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm

Note: This is a fork of an abandoned fork of the original project.

Installation

Add to your Gemfile:

gem 'omniauth-salesforce-modern'

Then bundle install.

Salesforce API Setup

  1. Follow the instructions in https://help.gong.io/hc/en-us/articles/360056677792-Create-an-app-for-Gong to create a "Connected app"

Usage

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

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :salesforce,
    Rails.application.credentials.dig(:salesforce, :key),
    Rails.application.credentials.dig(:salesforce, :secret)
end

You can now access the OmniAuth Salesforce URL: /auth/salesforce

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:

  • client_options: A hash of options to pass to the OAuth client

Here's an example of a possible configuration

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :salesforce,
    Rails.application.credentials.dig(:gong, :key),
    Rails.application.credentials.dig(:gong, :secret),
    client_options: {
      auth_scheme: :request_body
    }
end

License

See LICENSE

FAQs

Package last updated on 19 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc