waiting-for-dev/devise-jwt

Unauthorized request when requesting to heroku

arikarim opened this issue · 2 comments

Hello,

I try setting up authentication with devise and devise-jwt, everything works fine locally, but on Heroku when I try to send back the token after user login it always says unauthorized.
??????????????????????
this is my cors.rb:
` Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'http://localhost:3000'

resource '*', headers: :any,
              methods: :any,
              expose: :any,
              credentials: true

end
end
`

Please, I'd need you to fill the bug report template in order to be able to help you.

Fixed the issue, environmental variable needed on Heroku config.