Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:06:23+00:00 2026-06-13T13:06:23+00:00

I’d like to know which providers have been loaded for use by the OmniAuth

  • 0

I’d like to know which providers have been loaded for use by the OmniAuth gem. I’ve tried this:

OmniAuth::Strategies.constants  # a method provided by the standard lib Module class
# => [:Developer, :OAuth, :Twitter]

and this:

OmniAuth.strategies.inspect # a method provided by the OmniAuth class, but which has no documentation or comments around it.
# => [OmniAuth::Strategies::OAuth]

The answer I’d expect (or want) is [:Developer, :Twitter] as in my test code I’ve only loaded twitter explicitly, and the developer provided is loaded by default.

(This is all so a different library can load the correct things for it to work, dependent on what OmniAuth is running.)

If there is a way and you know of it, please let me know. Otherwise I’ll be pragmatic and knock OAuth out of the list from the first example.

Ruby is 1.9.3 and OmniAuth is v1.1.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:06:24+00:00Added an answer on June 13, 2026 at 1:06 pm

    OmniAuth::Strategies lists strategies available and registered. Not those that are in ‘use’. If you dig through the code of OmniAuth builder, you will see that various strategies are passed onto Rack using use as middleware in the provider block, which makes tracking the strategies harder. Another “pragmatic” approach is to monkey patch OmniAuth Builder and track the providers.

    module OmniAuth
      class Builder < ::Rack::Builder
        def provider_patch(klass, *args, &block)
          @@providers ||= []
          @@providers << klass
          old_provider(klass, *args, &block)
        end
        alias old_provider provider
        alias provider provider_patch
        class << self
          def providers
            @@providers
          end
        end
      end
    end
    

    Include this patch before configuring your providers. Once all the providers have been loaded, OmniAuth::Builder.providers will give you the array you want.

    Even though Developer strategy is available, it is not loaded. It is only loaded if you specify

    provider :developer
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I would like to run a str_replace or preg_replace which looks for certain words
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I have an autohotkey script which looks up a word in a bilingual dictionary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.