Let's now take a closer look at Devise and how it can support remote authentication. By itself, Devise is already customizable enough to enable support for remote authentication. However, Devise doesn't actually have internal functions for this purpose, and as a consequence, we have to do a lot of lifting to build this feature purely using Devise. Therefore, because it is almost always better to "re-use" rather than "build from scratch", let's look into other possible alternatives.
Enter
OmniAuth
(https://github.com/intridea/omniauth). If you remember from Chapter 1, Devise – Authentication Solution for Ruby on Rails, Devise has an Omniauthable
module that enables Devise to connect with OmniAuth; this is where you will find that ability useful.
"OmniAuth is a library that standardizes multiprovider authentication for web applications. It was created to be powerful, flexible, and do as little as possible. Any developer can create strategies for OmniAuth that can authenticate users...