inanepain / auth
Authentication adapters for common use cases.
1.3.0
2026-06-08 16:57 UTC
Requires
- php: >=8.5
- inanepain/http: >=0.4.0
- inanepain/id-forge: >=0.2.0
- inanepain/quickrank: >=0.1.0
This package is auto-updated.
Last update: 2026-06-08 17:07:05 UTC
README
Table of Contents
inanepain/auth
Authentication adapters for common use cases.
1. Install
composercomposer 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();