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

Allow define extra fields for sign up #36

Closed Plus17 closed 8 months ago

Plus17 commented 8 months ago

First of all, thank you very much for the work, I love this gem.

I would love to have the option to add a tos field to the sign up.

So this PR adds the extra_fields option in the sign_up config to be used by the method sign_up_params in the TokensController. I hope it is useful and can be included.

melchua commented 8 months ago

This would be super useful. Hope this can be reviewed/merged soon. I'm testing out the PR on my project.

AzhirAhmadi commented 6 months ago

Hi @nejdetkadir thanks for this great gem, Configuring the Devise for API was always a pain.

could you please update the RubyGems page's latest version too? The latest version is 1.3 which does not contain this change, in the read me file you added eaxtra_fields to devise-api configs and it will raise an error since the gem from RubyGems (gem with latest version 1.3) does not have this change. I have to set the gem to the git repo main branch to fix this error.