Bugfix: Fix password reset (#455)
This commit is contained in:
parent
0b31e14132
commit
a287c86bc4
5 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
class Devise::ConfirmationsController < Devise::ConfirmationsController
|
||||
class DeviseOverrides::ConfirmationsController < Devise::ConfirmationsController
|
||||
skip_before_action :require_no_authentication, raise: false
|
||||
skip_before_action :authenticate_user!, raise: false
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
class Devise::PasswordsController < Devise::PasswordsController
|
||||
class DeviseOverrides::PasswordsController < Devise::PasswordsController
|
||||
include AuthHelper
|
||||
|
||||
skip_before_action :require_no_authentication, raise: false
|
|
@ -1,4 +1,4 @@
|
|||
class Devise::SessionsController < ::DeviseTokenAuth::SessionsController
|
||||
class DeviseOverrides::SessionsController < ::DeviseTokenAuth::SessionsController
|
||||
# Prevent session parameter from being passed
|
||||
# Unpermitted parameter: session
|
||||
wrap_parameters format: []
|
|
@ -1,4 +1,4 @@
|
|||
class Devise::TokenValidationsController < ::DeviseTokenAuth::TokenValidationsController
|
||||
class DeviseOverrides::TokenValidationsController < ::DeviseTokenAuth::TokenValidationsController
|
||||
def validate_token
|
||||
# @resource will have been set by set_user_by_token concern
|
||||
if @resource
|
|
@ -1,9 +1,12 @@
|
|||
Rails.application.routes.draw do
|
||||
# AUTH STARTS
|
||||
match 'auth/:provider/callback', to: 'home#callback', via: [:get, :post]
|
||||
mount_devise_token_auth_for 'User', at: 'auth', controllers: { confirmations: 'devise/confirmations', passwords: 'devise/passwords',
|
||||
sessions: 'devise/sessions',
|
||||
token_validations: 'devise/token_validations' }, via: [:get, :post]
|
||||
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
|
||||
confirmations: 'devise_overrides/confirmations',
|
||||
passwords: 'devise_overrides/passwords',
|
||||
sessions: 'devise_overrides/sessions',
|
||||
token_validations: 'devise_overrides/token_validations'
|
||||
}, via: [:get, :post]
|
||||
|
||||
root to: 'dashboard#index'
|
||||
|
||||
|
|
Loading…
Reference in a new issue