rapide/yubikey

Yubikey for Laravel
9,880 1
Install
composer require rapide/yubikey
Latest Version:4.0.0
PHP:^8.2
Laravel:10 · 11 · 12
License:MIT
Last Updated:Sep 30, 2025
Links: GitHub  ·  Packagist
Maintainer: lucasvdh

Yubikey

Yubikey for Laravel 5

This package is based on the Laravel 4 package by Monarobase.

Buy a Yubikey

Yubico API Key Generator

Installation

Add bitbeans/yubikey to composer.json.

"bitbeans/yubikey": "dev-master"

Run composer update to pull down the latest version of Yubikey.

Now open up /config/app.php and add the service provider to your providers array.

'providers' => [
	Bitbeans\Yubikey\YubikeyServiceProvider::class,
]

And also the alias.

'aliases' => [
	'Yubikey' => Bitbeans\Yubikey\YubikeyFacade::class,
]

You can easily integrate the Yubikey Verification into your authentication system in two steps :

  • Add a field (eg yubikey_identity) in your user table
  • now check your user with username/email + password + yubikey_identity

Configuration

Run php artisan vendor:publish and modify the config file (PROJECTFOLDER/config/yubikey.php) with your own information.

Example

use YubiKey;

try {
	$yubikey_auth = Yubikey::verify(Input::get('otp'));
	$yubikey_params = Yubikey::getParameters();
	$yubikey_identity = Yubikey::getParameter('identity');
} catch (\Exception $exception) {
	$error = $e->getMessage();
}

Related Packages

marcinkozak/yubikey

Yubikey for Laravel 5

7,858 1
bitbeans/yubikey

Yubikey for Laravel 5

175,137 43
monarobase/yubikey

Yubikey for Laravel 4

421 9
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959

Version History

Version Released PHP Laravel License
4.0.0 ^8.2 ^10.0 || ^11.0 || ^12.0 MIT
v3.0.0 >=8.0 ^6.0 || ^7.0 || ^8.0 || ^9.0 MIT
v2.0.1 >=7.0.0 ^6.0 || ^7.0 || ^8.0 MIT
2.0.0 >=7.0.0 ^8.0 MIT
1.1.3 >=7.0.0 ^6.0.0 MIT