Code Monkey home page Code Monkey logo

trestle-auth-otp's Introduction

Trestle Authentication One Time Password (trestle-auth-otp)

Getting Started

These instructions assume you have a working Trestle application. To integrate trestle-auth-otp, first add it to your application's Gemfile:

gem 'trestle-auth-otp'

Run bundle install, and then run the install generator to set up configuration options, user model and user admin resource.

$ rails generate trestle:auth:install
$ rails generate trestle:auth:otp:install
$ rake db:migrate

Then create an initial admin user from the rails console:

$ rails console
> Administrator.create(email: "[email protected]", password: "password", first_name: "Admin", last_name: "User")

To update existing records

$ rails console
> Administrator.find_each { |a| a.update_attribute(:otp_secret_key, Administrator.otp_random_secret) }

After restarting your Rails server, any attempt to access a page within your admin will redirect you to the login page.

OTP must be enabled in the Administrator form for every record.

Notes

This gem is based on the work done by Sam Pohlenz on trestle-auth

License

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

trestle-auth-otp's People

Contributors

felipegomesdev avatar mcripper avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

neurologicai

trestle-auth-otp's Issues

Is there support for Rails 7?

I've been using Trestle(looks like a fascinating gem) and now I find myself needing to use a security feature which is auth otp and there is no support. My question is will there be support for this gem? Thanks

Error in "rails generate trestle:auth:otp:install"

Hi...
I need help when using your gem.

When executing the command rails generate trestle:auth:otp:install
I get the following error:

image

ruby 2.5.1
rails 5.2.3

The versions of the other trestle plugins are the most up-to-date.
image

Any ideas what can cause the problem?

--

Thank you for your assistance regarding this matter

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.