Skip to content

omniauth.auth nill #27

Description

@DavidLSO

Guys I'm having this problem when trying to perform authentication using lib version omniauth-bigcommerce (0.3.3)

/config/initializers/omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :bigcommerce, ENV['BC_CLIENT_ID'], ENV['BC_CLIENT_SECRET'],
  {
    scope: "store_payments_methods_read store_stored_payment_instruments_read_only store_v2_content_read_only store_v2_customers_read_only store_v2_default store_v2_orders_read_only store_v2_products_read_only store_v2_transactions_read_only users_basic_information",
    client_options: {
      site: 'https://login.bigcommerce.com'
    }
  }
end

config/routes.rb

get '/oauth' => 'omniauths#callback'
get '/load' => 'omniauths#load'
get '/uninstall' => 'omniauths#uninstall'

app/controllers/api/v1/omniauths_controller.rb

class Api::V1::OmniauthsController < Api::V1::BaseController
  skip_before_action :validate_access_token, only: [:callback, :uninstall, :load]

  def callback
    auth = request.env["omniauth.auth"] # nill ever
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions