Git Product home page Git Product logo

yorchauth-gem's Introduction

Yorchauth - Ruby Gem

The yorchauth gem allows you to configure a user authentication uing bcrypt and sendgrid as the default SMTP protocol.

If you want to build a user authentication rapidly and send email confirmations to any email account, the yorchauth gem will help you. It generates controllers (authenticate, users and sessions), mailers, model, views, routes and migrations.

Besides, it adds the Sendgrid Configuration in the config/development.rb file. You just need to create the env file and your API KYES from Sendgrid

Installation

Add the yorchauth gem in your Gemfile.

gem "yorchauth", github: 'Jorge-Ortiz-Mata/yorchauth-gem'

And then execute:

$ bundle install

Getting Started.

You can see the help documentation by running the following command: rails g yorchauth --help. It's not necessary to do it but it'll give you some information about how you can use this gem.

  1. Copy the ruby gem into your project, in the Gemfile and then run:
$ bundle install
  1. Generate the User Authentication using this command:
$ rails g yorchauth user

It generates controllers, models, views, migration, routes and a short configuration for Sendgrid in the config/environments/development.rb file.

  1. The Yorchauth gem uses two gems: bcrypt and dot-env. So you will need to install these gems. Run the next command:
$ bundle install
  1. Add your SENDGRID Keys into the .env file generated. For example:
  - SENDGRID_EMAIL_VALID='[email protected]'
  - SENDGRID_API_KEY='ALL_YOUR_API_KEY'
  1. Run the following command to create the users table:
$ rails db:migrate
  1. And finally, each controller you have will inherit from AuthenticateController.
class PagesController < AuthenticateController
  def index; end
end
  1. Don't forget to add your API Keys into your .gitignore file and enjoy!

Contributing

Feel free to contribute to this ruby gem. Make sure you have cloned this repository in your local computer. This repository has permissions, so you'll need to open a pull request each time you commit new changes.

License

The gem is available as open source under the terms of the MIT License.

yorchauth-gem's People

Contributors

jorge-ortiz-mata avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.