DEV Community

Discussion on: Devise: create a local OmniAuth strategy for Slack

Collapse
 
swiknaba profile image
Lud • Edited

you can simply move your code into a gem, for instance have a look at the google omniauth gem: github.com/zquestz/omniauth-google... which is basically the same as your script, with very little boilerplate around it.

Then you can just add that gem to your Gemfile. You can keep the gem's code inside your app, and just add the gem with a path option pointing to the sub-folder which contains your gem. Auto-reloading should work for the code inside your gem.

Add a nice README and some specs, and you can even publish your gem as open source 🎉 (also giving you bragging rights about writing an entire library yourself 😎)

UPDATE: just checked for fun, such gem already exists 🤷 github.com/kmrshntr/omniauth-slack...

Collapse
 
vvo profile image
Vincent Voyer

Hey there thanks for the comment, it will serve others for sure. As for me:

  • I am no more doing Rails so I won't publish such a gem, but again I think your comment is valuable because it shows others how to do it and how to have it working locally
  • As for the official omniauth slack strategy, I tried it and got issues as explained in the blog post (dev.to/vvo/devise-create-a-local-o...), last update was in 2017

Happy coding!