Browse Source

Update user account routes

pull/400/head
Paul Robert Lloyd 3 years ago
parent
commit
6621d08898
  1. 2
      app/controllers/auth/passwords_controller.rb
  2. 19
      config/routes.rb

2
app/controllers/auth/passwords_controller.rb

@ -66,7 +66,7 @@ protected
end
def after_sending_reset_password_instructions_path_for(_resource)
confirmations_reset_path(email: params.dig(resource_class_name, "email"))
account_password_reset_confirmation_path(email: params.dig(resource_class_name, "email"))
end
def after_resetting_password_path_for(resource)

19
config/routes.rb

@ -10,7 +10,11 @@ Rails.application.routes.draw do
confirmations: "active_admin/devise/confirmations",
two_factor_authentication: "auth/two_factor_authentication",
},
path_names: { sign_in: "sign-in", sign_out: "sign-out", two_factor_authentication: "two-factor-authentication" },
path_names: {
sign_in: "sign-in",
sign_out: "sign-out",
two_factor_authentication: "two-factor-authentication",
},
sign_out_via: %i[get],
}
@ -18,13 +22,20 @@ Rails.application.routes.draw do
get "admin/two-factor-authentication/resend", to: "auth/two_factor_authentication#show_resend"
end
devise_for :users, controllers: {
devise_for :users, {
path: :account,
controllers: {
passwords: "auth/passwords",
sessions: "auth/sessions",
}, path_names: { sign_in: "sign-in", sign_out: "sign-out" }
},
path_names: {
sign_in: "sign-in",
sign_out: "sign-out",
},
}
devise_scope :user do
get "confirmations/reset", to: "auth/passwords#reset_confirmation"
get "account/password/reset-confirmation", to: "auth/passwords#reset_confirmation"
end
get "/health", to: ->(_) { [204, {}, [nil]] }

Loading…
Cancel
Save