Closed jdblack closed 9 months ago
I've done this : i created a "token controller" in which i wrote : ` class TokensController < Devise::Api::TokensController
def sign_in
super()
end
private
def sign_up_params
params.permit(:first_name, :last_name, *resource_class.authentication_keys,
*::Devise::ParameterSanitizer::DEFAULT_PERMITTED_ATTRIBUTES[:sign_up]).to_h
end
end `
and don't forget to update your routes :
devise_for :users, controllers: { tokens:"tokens" }
My apologies if I've missed something obvious here, as I'm new to devise-api.
I'm attempting to use a User model that has extra required fields. I updated my application_controller to permit name, but it seems to not be passing through.
Any advice on what I can do to debug and resolve this? Should I keep all non-user related stuff out of the user table instead?
Thanks much!
Versions Ruby: 3.2.2 Rails: 7.0.8 Devise: 4.9 Devise-api: 0.1.3
app/controllers/application_controller:
My user schema
Rails during run