Rails5_starter

screenshot of Rails5_starter

Rails 5 Starter with Social Login

Overview

This guide provides instructions on how to set up a Rails 5 Starter with Social Login feature. It covers the generation of User and Identity models, creation of Home and Sessions controllers, modification of routes, installation of the omniauth-google-oauth2 gem, editing of the omniauth.rb initializer, and modification of the User model, application controller, and application layout.

Features

  • Model Generation: Generate User and Identity models to store user information and associated credentials.
  • Controller Generation: Generate Home and Sessions controllers to handle user authentication and login.
  • Route Configuration: Modify the routes file to include necessary routes for the social login feature.
  • Gem Installation: Add the omniauth-google-oauth2 gem to the Gemfile and run the necessary commands to install it.
  • Initializer Editing: Edit the omniauth.rb initializer file to configure the social login provider.
  • Model Modification: Add code to the User model to define associations and methods related to the social login feature.
  • Controller Modification: Add code to the application controller to determine the user's login status.
  • Layout Modification: Modify the application layout to display a sign in/sign out link.

Summary

This guide outlines the process of setting up a Rails 5 Starter with Social Login feature. By following the provided instructions, you can generate the necessary models and controllers, configure routes, install the required gem, and make the necessary modifications to achieve the desired functionality.