qmetrics.net

bcrypt-ruby

Ruby bindings for OpenBSD bcrypt password hashing

bcrypt-ruby wraps the OpenBSD bcrypt algorithm so Ruby applications can store and verify secure password hashes.

Overview

bcrypt-ruby is a Ruby gem that binds the OpenBSD bcrypt() password hashing function. It lets web applications store one-way password digests instead of plaintext secrets, reducing damage if a database is copied.

The library automatically generates and stores salts with hashes. Salts defeat precomputed rainbow tables by forcing attackers to hash guesses per salt. bcrypt() is deliberately slow compared with fast digests like MD5, shrinking how many guesses an attacker can test per second. You can raise the cost factor as machines get faster while old hashes remain valid.

The default cost factor is 12, which suits session-based authentication; stateless schemes such as HTTP Basic Auth may use a lower cost to limit server load. BCrypt::Password and related APIs cover creating accounts and authenticating users; Rails 3 and later ship ActiveModel::SecurePassword built on bcrypt-ruby.

The gem installs on JRuby, Windows RubyInstaller builds with DevKit, and typical BSD, macOS, and Linux systems with a compiler. bcrypt() is the default password storage approach in OpenBSD.

Key features

  • OpenBSD bcrypt algorithm binding
  • Automatic per-password salts
  • Adjustable work cost factor
  • BCrypt::Password hash objects
  • Rails SecurePassword integration
  • JRuby and CRuby support
  • Windows RubyInstaller compatibility
  • Slow hashing against brute force

Use cases

  • Storing user passwords in Ruby web apps
  • Authenticating login credentials safely
  • Rails applications using has_secure_password
  • Increasing hash cost over time
  • Replacing fast insecure password digests

Similar software

Auth.js

Web authentication libraries for JavaScript frameworks

Auth.js (NextAuth) adds sign-in, sessions, and OAuth to modern JavaScript apps. Packages target Next.js, SvelteKit, Express, Qwik, and other runtimes.

  • OAuth 2.0 and OIDC providers
  • Email and passwordless sign-in
  • WebAuthn passkey support
TypeScriptDetails →
★ 28.4k⟳ 4 months agoISC
Open Source Alternative to:Amazon CognitoAuth0+4

Devise

Modular authentication engine for Ruby on Rails

Devise adds sign-in, registration, and related account flows to Rails apps through a Warden-backed engine. Teams enable only the authentication modules they need for each user model.

  • Rack and Warden integration
  • Pluggable authentication modules
  • Rails engine MVC stack
RubyDetails →
★ 24.3k⟳ 1 month agoMIT

Sa-Token

Java lightweight permission and session framework

Sa-Token adds login, permission checks, SSO, OAuth2, and microservice gateway auth to Java web projects with minimal boilerplate.

  • Login and permission annotations
  • Distributed session with Redis
  • Built-in SSO mode variants
JavaDetails →
★ 19.1k⟳ 16 days agoApache-2.0

jsonwebtoken

Node.js library for signing and verifying JSON Web Tokens

jsonwebtoken implements JWT creation and verification for Node.js using HMAC, RSA, ECDSA, and related algorithms. It exposes sign, verify, and decode helpers built on node-jws.

  • JWT sign and verify APIs
  • HMAC and asymmetric algorithms
  • Standard claim options
JavaScriptDetails →
★ 18.2k⟳ 5 months agoMIT

JustAuth

Java library for third-party OAuth login

JustAuth is a Java component that wires social and enterprise OAuth providers into applications without vendor-specific SDKs. It exposes a small API with builder-style configuration.

  • Dozens of built-in OAuth providers
  • Builder and plain API styles
  • Custom OAuth platform adapters
JavaDetails →
★ 17.6k⟳ 7 months agoMIT

laravel-permission

Laravel roles and permissions management package

A Laravel package that stores roles and permissions in your database and wires them to users, with helpers to assign capabilities and check access through Laravel's gate and Blade.

  • Database-backed roles and permissions
  • Assign permissions and roles to users
  • Permissions registered on Laravel gate
PHPDetails →
★ 13k⟳ 3 days agoMIT