PHPackages                             sam002/yii2-otp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. sam002/yii2-otp

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

sam002/yii2-otp
===============

YII2 extension for generating one time passwords according to RFC 4226/6238 (HOTP/TOTP Algorithm) and authentication widget

2.0.0(8y ago)149316[1 issues](https://github.com/sam002/yii2-otp/issues)LGPL-3.0PHP

Since Feb 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sam002/yii2-otp)[ Packagist](https://packagist.org/packages/sam002/yii2-otp)[ RSS](/packages/sam002-yii2-otp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

yii2-otp
========

[](#yii2-otp)

[![Code Climate](https://camo.githubusercontent.com/c72951d03989176315c7e5c1b590771b83bd881e4aec6bb9091c4b1d7dde4471/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73616d3030322f796969322d6f74702f6261646765732f6770612e737667)](https://codeclimate.com/github/sam002/yii2-otp)[![SensioLabsInsight](https://camo.githubusercontent.com/981ebf8c52c92260ed79c7959301f23e979d0c10fcad5e6ad9f355cecbce2ca6/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63623365343561392d663961332d343834332d626665352d3536613163633738383364322f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/cb3e45a9-f9a3-4843-bfe5-56a1cc7883d2)

[![Latest Version](https://camo.githubusercontent.com/95027d0e3d94519ca0540360b0e827f0a4933fc10cfba8d905e62066883fdf6e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f73616d3030322f796969322d6f74702e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c656173)](https://github.com/sam002/yii2-otp/tags)[![Software License](https://camo.githubusercontent.com/676198a84d2ac4a06f649c6765e3c3d2a9e8e6546d8d6676a6a33c1f6d08ff4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4c47504c332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

[![Build Status](https://camo.githubusercontent.com/43c9f1d79176c3bce5158d2ee9360d69e80d6cdb3dd7b8f22f308b727ed78db7/68747470733a2f2f7472617669732d63692e6f72672f73616d3030322f796969322d6f74702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sam002/yii2-otp)

YII2 extension for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require sam002/yii2-otp:~2.0.0

```

or add

```
"sam002/yii2-otp" : "~2.0.0"
```

to the require section of your application's `composer.json` file.

Usage
-----

[](#usage)

After extension is installed you need to setup auth client collection application component:

**Configure**

```
