Project

authpls

0.0
No release in over 3 years
A Gem that scaffolds a complete API-only authentication and session system
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

Authpls

A Ruby gem that scaffolds a complete API-only authentication and session system for Rails applications.

What It Generates

Running the generator creates:

  • User model with has_secure_password and email normalization
  • Session model with secure token authentication and expiry
  • Invite-only registration via admin-issued signup tokens
  • Password resets with mailer
  • Admin gating for protected endpoints
  • Rate limiting on auth endpoints
  • Session cleanup job for expired sessions
  • All controllers, migrations, models, serializers, and routes under an Auth:: namespace

Installation

Add to your Gemfile:

gem "authpls"

Then run:

bundle install

Usage

Generate the auth scaffold:

rails generate authpls:scaffold

Then run migrations:

rails db:migrate

Requirements

  • Ruby >= 3.2
  • Rails (API mode)

License

MIT