devise_invitable icon indicating copy to clipboard operation
devise_invitable copied to clipboard

Use gem with API app

Open 00dav00 opened this issue 6 years ago • 2 comments

Does anyone have experience using this gem with API only apps? I looked for info in the wiki but couldn't find anything. Thanks!

00dav00 avatar May 17 '18 20:05 00dav00

Why you edited the issue and remove all the code? It was useful to help you debugging where can be the issue.

Anyway, you could override invite_params method in your controller, and log what it returns, although I guess it will return empty due to validation error you got.

    def invite_params
      super.tap do |val|
        logger.info val.inspect
      end
    end

Have you changed invite_keys setting in initializer or model?

scambra avatar Feb 03 '22 19:02 scambra

You may have issues with devise parameter sanitizer so you may need to define your own invite_params method. Check this: https://stackoverflow.com/questions/42383243/setting-up-an-api-using-devise-for-authentication

I haven't digged deep enough, but sanitizer may work different depending on how routes are defined

scambra avatar Feb 03 '22 19:02 scambra