app/controllers/api/sessions_controller.rb
# DELETE (or GET depending on devise setting) /resource/sign_out

DELETE (or GET depending on devise setting) /resource/sign_out
DELETE ( or GET depending on devise setting ) / resource / sign_out
def destroy
    signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
    respond_to do |format|
      format.all do
        head :ok
      end
    end
  end
def destroy signed_out = ( Devise . sign_out_all_scopes ? sign_out : sign_out ( resource_name ) ) respond_to do | format | format . all do head :ok end end end
DELETE (or GET depending on devise setting) /resource/sign_out
DELETE ( or GET depending on devise setting ) / resource / sign_out
# don't redirect at all
 #redirect_path = after_sign_out_path_for(resource_name)
 # still sign out
 #set_flash_message :notice, :signed_out if signed_out
 # We actually need to hardcode this as Rails default responder doesn't
 # support returning empty response on GET request
 # only respond with a HEAD 200 OK.
 #format.any(*navigational_formats) { redirect_to redirect_path }
