qmetrics.net

Otp.NET

C# TOTP and HOTP library for two-factor codes

Otp.NET screenshot

Otp.NET implements RFC 6238 TOTP and RFC 4226 HOTP in C# for generating and verifying one-time passwords used in two-factor authentication.

Overview

Otp.NET gives .NET applications a straightforward way to compute and validate time-based and counter-based one-time codes from a shared secret. The timed variant rolls codes over configurable step windows and supports SHA-1, SHA-256, and SHA-512 hashing with adjustable digit length.

Developers create Totp or Hotp instances, call compute methods with UTC timestamps or counters, and verify user-supplied codes. Verification can honor RFC-recommended clock skew via a verification window, report which time step matched, and apply optional time-correction offsets when client clocks drift from authoritative time.

Additional helpers generate OTP URI strings in the standard key URI format and provide Base32 encoding utilities compatible with authenticator apps. The package ships on NuGet for .NET Standard, modern .NET, and .NET Framework targets and can run server-side or inside mobile apps built with Mono.

Consumers remain responsible for ensuring each code is accepted only once, since the library itself does not persist usage state.

Key features

  • RFC 6238 TOTP implementation
  • RFC 4226 HOTP implementation
  • Configurable hash and digit size
  • VerifyTotp with skew windows
  • TimeCorrection for clock drift
  • OTP URI key format generator
  • Base32 encoding helper
  • NuGet distribution for .NET

Use cases

  • Server-side 2FA verification
  • Embedding OTP in mobile apps
  • Building custom authenticator flows
  • Generating provisioning URIs

Tags

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⟳ 1 year agoMIT
Identity & Access Management (IAM)No commits in 18+ months

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⟳ 4 days agoMIT