Skip to content

This is the official yorchauth ruby gem. This gem allows users to create a user authentication in a few steps.

License

Notifications You must be signed in to change notification settings

Jorge-Ortiz-Mata/yorchauth-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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='myuser@email.com'
  - 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.

About

This is the official yorchauth ruby gem. This gem allows users to create a user authentication in a few steps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published