Create a package named overrides, in cotrollers package.
For overriding RegistrationsController used for signup flow, add registrations_controller.rb to the package we just created and extent the RegistrationsController by DeviseTokenAuth::RegistrationsController.
1 2 3 4 5
moduleOverrides classRegistrationsController < DeviseTokenAuth::RegistrationsController ... end end
Now write the create method yourself for your custom parameters you want to use while signing up a user with custom conditions and if there is any condition when you don’t want to handle, then just call super and the default signup flow will work for that case.