Ho un modello Candidato che è concepito omniauthable (linkedin).Devise + Omniauth, route versioning
Finora, il mio routes.rb si presentava così:
namespace :v1 do
devise_for :candidates, only: :omniauth_callbacks
...
end
Tutto ha funzionato bene fino a quando ho dovuto aggiungere una nuova versione:
namespace :v2 do
devise_for :candidates, only: :omniauth_callbacks
...
end
namespace :v1 do
devise_for :candidates, only: :omniauth_callbacks
...
end
con l'attuale configurazione, ottengo questo errore:
`set_omniauth_path_prefix!': Wrong OmniAuth configuration. If you are getting this exception, it means that either: (RuntimeError)
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
È un po 'fastidioso peccato ce voglio essere in grado di autenticare il candidato su entrambe le versioni.
Cosa posso fare?
Hai trovato una soluzione? Sto affrontando l'esatto problema SAME qui. :( – jlstr
Non l'ho fatto, fatemi sapere se trovate qualcosa;) –
SI !, ho trovato come aggiustarlo. Lo posterò presto come risposta. – jlstr