devise sign_out problem solution in rails
YouTube video link to see this problem-- https://www.youtube.com/watch?v=_sl5SKpuOj4
If you face this problem so ,you go to your config/config/initializers/devise.rb
config.sign_out_via = :delete 👈
config.sign_out_via = :get
and restart the server
# frozen_string_literal: true
.
Devise.setup do |config|
# ==> Controller configuration
# Configure the parent class to the devise controllers.
# config.parent_controller = 'DeviseController'
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
require 'devise/orm/active_record'
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [:email]
config.strip_whitespace_keys = [:email]
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# Limiting the stretches to just one in testing will increase the performance of
config.stretches = Rails.env.test? ? 1 : 12
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
# ==> Configuration for :validatable
# Range for password length.
config.password_length = 6..128
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
config.reset_password_within = 6.hours
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete 👈
config.sign_out_via = :get
end

Comments
Post a Comment