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

Missing template /omniauth_response #132

Closed
fikriauliya opened this issue Feb 4, 2015 · 5 comments
Closed

Missing template /omniauth_response #132

fikriauliya opened this issue Feb 4, 2015 · 5 comments

Comments

@fikriauliya
Copy link

I use latest Rails-API & latest devise_token_auth (beta), after successful callback from Facebook OmniAuth, the following errors happen:

ActionView::MissingTemplate (Missing template /omniauth_response with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby]}. Searched in:
  * "/home/vagrant/.rvm/gems/ruby-2.2.0/gems/devise_token_auth-0.1.32.beta1/app/views"
  * "/home/vagrant/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/app/views"
):

It could be fixed by replacing (in omniauth_callbacks_controller.rb):

format.html { render :layout => "omniauth_response", :template => "devise_token_auth/omniauth_success" }

to

format.html { render :layout => "layouts/omniauth_response", :template => "devise_token_auth/omniauth_success" }
fikriauliya added a commit to fikriauliya/angularjs-rails-api-devise-bootstrap that referenced this issue Feb 4, 2015
@lynndylanhurley
Copy link
Owner

Thanks @fikriauliya - I'll look into this right away.

@fikriauliya
Copy link
Author

And probably it would be better to drop those respond_to statements, e.g. change:

respond_to do |format|
    format.html { render :layout => "omniauth_response", :template =>   "devise_token_auth/omniauth_failure" }
end

to just:

render :layout => "omniauth_response", :template =>   "devise_token_auth/omniauth_failure" 

The inclusion of respond_to drags ActionController::MimeResponds to rails-api (https://github.com/rails-api/rails-api#adding-other-modules) which drags gem "responders" (rails-api/rails-api#179)

@lynndylanhurley
Copy link
Owner

@fikriauliya - I'm unable to reproduce this bug. I just pushed the latest code up to the demo site and everything seems to be working fine.

Are there any notable differences between your app and the reference implementation?

@fikriauliya
Copy link
Author

Perhaps because I use Rails API? https://github.com/fikriauliya/angularjs-rails-api-devise-bootstrap
Probably the view engine doesn't auto include layouts/ folder

@lynndylanhurley
Copy link
Owner

@fikriauliya - version 0.1.32.beta5 contains the changes that you suggested. Please confirm that the issues are resolved.

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