This is my problem, I override the controllers for an User model:
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
registrations: 'v1/authentication/registrations'
sessions: 'v1/authentication/sessions'
token_validations: 'v1/authentication/token_validations'
}
This work well, no problems. But, when i add a new Model using the same controllers:
mount_devise_token_auth_for 'Admin', 'admin_auth', controllers: {
sessions: 'v1/authentication/sessions',
token_validations: 'v1/authentication/token_validations'
}
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
registrations: 'v1/authentication/registrations',
sessions: 'v1/authentication/sessions',
token_validations: 'v1/authentication/token_validations'
}
Them the response header for Admin model dont have the auth keys. The response is ok(200) but dont return the auth headers. But if remove the controllers part(the override) for the Admin model the response return the auth keys. By the way, the overrides only change the render methods of the controllers. Any can help to find the way to solve this?