I keep getting a 401 on the create action. I have tried to change the file along with the routes.
here is my routes file.
mount_devise_token_auth_for "User", at: "auth", controllers: { passwords: "passwords", sessions: "custom_sessions" }
this is the custom_sessions_controller.rb file.
class CustomSessionsController < Devise::SessionsController
def create
binding.pry
super
end
def destroy
end
end
if you want to override devise SessionsController then
create file /app/controllers/devise/sessions_controller.rb
and below are the sample program that I use to redirect user after successfully login