Authentication adapters for common use cases.

Maintainers

Package info

github.com/inanepain/auth

pkg:composer/inanepain/auth

Statistics

Installs: 13

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.2.0 2026-05-26 19:36 UTC

This package is auto-updated.

Last update: 2026-06-03 21:22:10 UTC


README

Table of Contents

icon inanepain/auth

Authentication adapters for common use cases.

1. Install

composer
composer require inanepain/auth

2. Two-Factor Authentication

Generating and verifying tokens and pins.

2.1. Generate Token

$token = new \Inane\Auth\TwoFactor\Token('Inane');
echo "$token";

2.2. Verify OTP

$otp = new \Inane\Auth\TwoFactor\OneTimePin($token);
$valid = $otp->verifyOTP('612777');

2.3. QRCode URL

// OTP URL (otpauth://)
$otpUrl = $token->getOTPUrl();
// OR
$imgBase64 = $token->getImageBase64();