inanepain / auth
Authentication adapters for common use cases.
1.2.0
2026-05-26 19:36 UTC
Requires
- php: >=8.1
- inanepain/http: *
- inanepain/quickrank: *
This package is auto-updated.
Last update: 2026-06-03 21:22:10 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();