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

Wrong OmniAuth configuration. If your are getting this exception... message #129

Open
vmvwebworks opened this issue Feb 24, 2017 · 8 comments

Comments

@vmvwebworks
Copy link

vmvwebworks commented Feb 24, 2017

After configure, i tried to start the server and said this:

Wrong OmniAuth configuration. If you are getting this exception, it means that either:

1) You are manually setting OmniAuth.config.path_prefix and it doesn't match the Devise one
2) You are setting :omniauthable in more than one model
3) You changed your Devise routes/OmniAuth setting and haven't restarted your server my-profile-configuration/gems/devise-3.2.4/lib/devise/rails/routes.rb:471:in `set_omniauth_path_prefix!

I have this on my user model
devise :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :database_authenticatable, :omniauthable, :omniauth_providers => [:saml]

I follow the instructions include when it says to follow omniauth facebook example and got this. What would be done?

@ilikepi
Copy link
Contributor

ilikepi commented Feb 24, 2017

Hello,

Could you please also post the devise_for statement from your config/routes.rb file?

@vmvwebworks
Copy link
Author

vmvwebworks commented Feb 27, 2017

Of course

devise :registerable, :confirmable, :recoverable,
         :rememberable, :trackable, :validatable, :database_authenticatable, :omniauthable, :omniauth_providers => [:saml]

@vmvwebworks
Copy link
Author

vmvwebworks commented Feb 27, 2017

http://stackoverflow.com/questions/24574094/deviseomniauth-routes-versioning

The solution that uncomment the line at the bottom of the file, it says:
# config.omniauth_path_prefix = '/my_engine/users/auth'
and add your route

@ilikepi
Copy link
Contributor

ilikepi commented Feb 28, 2017

Hi @vmvwebworks,

Can you please confirm that the solution in that Stack Overflow post resolved your issue? Or are you still encountering the error?

@vmvwebworks
Copy link
Author

vmvwebworks commented Feb 28, 2017

Yes, it solved, at least for now. I still developing the same feature, i will notify here if i found more issues.

@vmvwebworks vmvwebworks changed the title configuration for devise Wrong OmniAuth configuration. If your are getting this exception... message Feb 28, 2017
@dwoznicka
Copy link

thanks for this @vmvwebworks , i've encountered same issue and couldn't find any solution until now. would be best if we could add this to readme

@Romain-C
Copy link

The fix is nice but as the config file is global than it doesn't work when using multiple devise model and not all are on the namespace. Any ideas on how to achieve this path fix for only one devise model/route ?

@motazbalghonaim
Copy link

We are currently running into this issue too. Any updates or potential workarounds?

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

5 participants