The devise-api gem is a convenient way to add authentication to your Ruby on Rails application using the devise gem. It provides support for access tokens and refresh tokens, which allow you to authenticate API requests and keep the user's session active for a longer period of time on the client side
MIT License
152
stars
22
forks
source link
Disable parameter wrapping in TokensController #42
As mentioned in https://github.com/nejdetkadir/devise-api/issues/8, the default rails behaviour for wrapping parameters was causing an unpermitted parameter message to appear in the server logs for requests made to the TokensController. This PR disables that behaviour so rails will no longer inject token: {} into the request params.
While I was in the repo I also fixed the 4 failing specs in token_response_spec and dried them up a little bit.
As mentioned in https://github.com/nejdetkadir/devise-api/issues/8, the default rails behaviour for wrapping parameters was causing an unpermitted parameter message to appear in the server logs for requests made to the
TokensController
. This PR disables that behaviour so rails will no longer injecttoken: {}
into the request params.While I was in the repo I also fixed the 4 failing specs in
token_response_spec
and dried them up a little bit.