You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add another way to sign in to my application wich can use te original sign_in method, catch the result and then do more validations after return the request.
I try something like this:
class AnotherController < ApplicationController
def sign_in_2
redirect_to '/devise_token_auth/sessions#create' do |x|
# make validations with values in x
end
end
end
this trhow me an '302 found'
The text was updated successfully, but these errors were encountered:
Ok, also try to ihnerits from DeviseTokenAuth::SessionsController and overrides the create method but now I get this message error when I try to acces via post 'another/sign_in_2' => 'another#create'
[Devise] Could not find devise mapping for path "/another/sign_in_2".
This may happen for two reasons:
1) You forgot to wrap your route inside the scope block. For example:
devise_scope :user do
get "/some/route" => "some_devise_controller"
end
2) You are testing a Devise controller bypassing the router.
If so, you can explicitly tell Devise which mapping to use:
@request.env["devise.mapping"] = Devise.mappings[:user]
Completed 404 Not Found in 2ms (ActiveRecord: 0.6ms)
In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error!
If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it.
I'm trying to add another way to sign in to my application wich can use te original sign_in method, catch the result and then do more validations after return the request.
I try something like this:
this trhow me an '302 found'
The text was updated successfully, but these errors were encountered: