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
require_relative'boot'require'rails'# Pick the frameworks you want:require'active_model/railtie'require'active_job/railtie'require'active_record/railtie'require'active_storage/engine'require'action_controller/railtie'require'action_mailer/railtie'require'action_mailbox/engine'require'action_text/engine'require'action_view/railtie'require'action_cable/engine'# require "sprockets/railtie"require'rails/test_unit/railtie'# Require the gems listed in Gemfile, including any gems# you've limited to :test, :development, or :production.Bundler.require(*Rails.groups)modulePmeApiclassApplication < Rails::Applicationconfig.load_defaults6.0config.api_only=trueconfig.eager_load_paths << Rails.root.join('lib')# Cors SetupRails.application.config.middleware.insert_before0,Rack::Corsdoallowdoorigins'*'resource'*',headers: :any,expose: ['access-token','expiry','token-type','uid','client'],methods: [:get,:post,:patch,:put,:delete]endendendend
OMG. 😂
The error occurred because I was trying to validate the :password column that did not exist in my table. LOL
I just remove the :password validator in my model and all works again. Hahaha
Rails version: 6.0.3.7
Devise token auth version: 1.1.5
Ruby Version: 3.0.0
application.rb
initializers/devise_token_auth.rb:
models/Contributor.rb:
Router file:
When I call: [POST] - myapp/api/contributor/auth/sign_in i have this error:
Request body:
what am I doing wrong ?
If I change
config.change_headers_on_each_request
tofalse
. I have a 200 status request but tokens are not generated.The text was updated successfully, but these errors were encountered: