I want to create a rails API with the devise gem for authentication. I am using Chrome Postman to check API outputs.
My environments:
- Rails 4.2
- Ruby 2.3
What I did:
ran
rails new my_api cd my_apiadded devise gem in
Gemfilebundle installadded
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }to
environment/development.rb- created one user using
rails console
After that I tried to login from postman.
I gave email and password into headers of postman.
POST http://localhost:3000/users/sign_in
headers
email abcd@gamilcom
password abcd1234
but it's not authenticating. What do I need to do?