nejdetkadir / devise-api

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

Closed k-p-jones closed 2 months ago

k-p-jones commented 2 months ago

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.

nejdetkadir commented 2 months ago

thank u for your PR ❤️