Social authentication is an important feature for web and mobile applications because there's a significant amount of users that prefer it over th

Add social login to a Rails application

submited by
Style Pass
2024-11-26 14:30:04

Social authentication is an important feature for web and mobile applications because there's a significant amount of users that prefer it over the typical password based authentication.

In this article, we will explore how to add social login to a Rails application using Devise and the OmniAuth gem to implement Google and GitHub authentication.

Social login is the colloquial name used to refer to the implementation of the OAuth2 protocol to sign users into a given application.

The protocol was created to allow applications to access resources from a third party in behalf of a user without the user providing her third-party's credentials to the application itself.

The third party can share as little as the user's email and profile information, or it can allow access to resources owned by the user.

For our intents and purposes we just want the identity provider to give us a sort of “key” that corroborates that the user approved to share some resources with us, an email and profile for example.

Leave a Comment