Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "undefined method `config' for MiaAuth:Module" when deploy to Heroku. #23

Open
yutna opened this issue Mar 12, 2019 · 1 comment

Comments

@yutna
Copy link

yutna commented Mar 12, 2019

Bug report

The OmniauthCallbacksController invoke the invalid method when its try to loop call Omniauth provider.

# This will raise the error: undefined method `config' for MiaAuth:Module
MiaAuth.config.omniauth_providers.each do |provider|
    define_method provider do
        authenticate
    end
end

# Fix this issue by changing the `config` to `configuration`
MiaAuth.configuration.omniauth_providers.each do |provider|
    define_method provider do
        authenticate
    end
end

The configuration method has been defined in lib/mia_auth.rb

Screen Shot 2562-03-12 at 11 58 31

@olivierobert
Copy link
Contributor

Thanks for opening an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants