inanepain / auth
Authentication adapters for common use cases.
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/inanepain/auth
Requires
- php: >=8.1
- inanepain/http: *
This package is auto-updated.
Last update: 2025-10-01 18:34:34 UTC
README
Table of Contents
inanepain/auth
Authentication adapters for common use cases.
Install
composercomposer require inanepain/auth
Two-Factor Authentication
Generating and verifying tokens and pins.
Generate Token
$token = new \Inane\Authentication\TwoFactor\Token('Inane'); echo "$token";
Verify OTP
$otp = new \Inane\Authentication\TwoFactor\OneTimePin($token); $valid = $otp->verifyOTP('612777');
QRCode URL
$imgUrl = $token->getQRCodeUrl(); // OR $imgBase64 = $token->getImageBase64();