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

Sign out with email provider error #16

Closed
markusklooth opened this issue Aug 19, 2014 · 4 comments
Closed

Sign out with email provider error #16

markusklooth opened this issue Aug 19, 2014 · 4 comments

Comments

@markusklooth
Copy link

When routing to sessions#destroy (logging out with email provider), in the SessionsController#destroy function,

    def destroy
      sign_out(resource_name)

      render json: {
        success:true
      }
    end

a before_filter verify_signed_out_user from the Devise::SessionsController is run.

prepend_before_filter :verify_signed_out_user, only: :destroy

Inside verify_signed_out_user the function respond_to_on_destroy is called which renders an output:

def respond_to_on_destroy
    # We actually need to hardcode this as Rails default responder doesn't
    # support returning empty response on GET request
    respond_to do |format|
      format.all { head :no_content }
      format.any(*navigational_formats) { redirect_to after_sign_out_path_for(resource_name) }
    end
  end 

before the render json: {success:true} is executed resulting in an error.

Redirected to http://localhost:3000/
Filter chain halted as :verify_signed_out_user rendered or redirected
@lynndylanhurley
Copy link
Owner

@markusklooth - good catch! I'll look into this ASAP.

@lynndylanhurley
Copy link
Owner

@markusklooth - this should be resolved with 0.1.26.beta1. Let me know if you run into any more issues.

@lynndylanhurley
Copy link
Owner

Looks like I spoke too soon. There seems to be an issue with devise 3.3.0. I posted an issue (heartcombo/devise#3163), but in the meantime you can downgrade to devise 3.2.4.

Reopening until the issue is resolved.

@lynndylanhurley
Copy link
Owner

This should be resolved in version 0.1.27.beta3 and later.

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