PHPackages                             rinvex/laravel-authy - 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. rinvex/laravel-authy

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

rinvex/laravel-authy
====================

Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

v10.1.0(3y ago)3376.7k9[1 PRs](https://github.com/rinvex/laravel-authy/pulls)1MITPHPPHP ^8.1.0

Since Nov 17Pushed 2y ago2 watchersCompare

[ Source](https://github.com/rinvex/laravel-authy)[ Packagist](https://packagist.org/packages/rinvex/laravel-authy)[ Docs](https://rinvex.com)[ RSS](/packages/rinvex-laravel-authy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (22)Used By (1)

Rinvex Authy
============

[](#rinvex-authy)

This package is just a Laravel wrapper for [`rinvex/authy`](https://github.com/rinvex/authy).

**Rinvex Authy** is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

[![Packagist](https://camo.githubusercontent.com/3d286e4b87e202b395a7f2f4248db72251ec2ff2b8ad594c4d7a54f1db78c86f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696e7665782f6c61726176656c2d61757468792e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/rinvex/laravel-authy)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e1f6e3f9b20072746a6cdfc5477a14ef551b017fc88720be1176ae773c1ebb7f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696e7665782f6c61726176656c2d61757468792e7376673f6c6162656c3d5363727574696e697a6572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rinvex/laravel-authy/)[![Travis](https://camo.githubusercontent.com/9df1501a5cfd8af8796e4ebb67f23823dcad97423ede17d819e46dd6582f0871/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696e7665782f6c61726176656c2d61757468792e7376673f6c6162656c3d5472617669734349267374796c653d666c61742d737175617265)](https://travis-ci.org/rinvex/laravel-authy)[![StyleCI](https://camo.githubusercontent.com/f024b14c0cb8857645c44ca3ef20f7982a2a4faf22df26936b4e02a1c6c29446/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333939393538382f736869656c64)](https://styleci.io/repos/73999588)[![License](https://camo.githubusercontent.com/3aa23717b2b24b587f1378d6e9483de59b516dfc73a6b2ee1dff2cdb016d8d6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72696e7665782f6c61726176656c2d61757468792e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/rinvex/laravel-authy/blob/develop/LICENSE)

[![Rinvex Authy](https://camo.githubusercontent.com/b5d8051e21028926dc53ce943fa56c9e9c76369e1e28815b8385f11335ff2b8d/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f72696e7665782d61757468792e706e67 "Rinvex Authy")](https://camo.githubusercontent.com/b5d8051e21028926dc53ce943fa56c9e9c76369e1e28815b8385f11335ff2b8d/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f72696e7665782d61757468792e706e67)

Table Of Contents
-----------------

[](#table-of-contents)

- [Usage](#usage)
- [Installation](#installation)
- [Upgrade](#upgrade)
- [Changelog](#changelog)
- [Support](#support)
- [Contributing &amp; Protocols](#contributing--protocols)
- [Security Vulnerabilities](#security-vulnerabilities)
- [About Rinvex](#about-rinvex)
- [Trademarks](#trademarks)
- [License](#license)

Usage
-----

[](#usage)

Usage is pretty easy and straightforward:

### Authy App

[](#authy-app)

Get Authy app instance and interact with it:

```
$authyApp = app('rinvex.authy.app');
$appStats = $authyApp->stats(); // Get app stats
$appDetails = $authyApp->details(); // Get app details
```

### Authy User

[](#authy-user)

Get Authy user instance and interact with it:

```
$authyUser = app('rinvex.authy.user');
$user = $authyUser->register('user@domain.com', '317-338-9302', '54'); // Register user
$userActivity = $authyUser->registerActivity($user->get('user')['id'], 'cookie_login', 'Test Data'); // Register user activity
$userStatus = $authyUser->status($user->get('user')['id']); // Get user status
$userDeleted = $authyUser->delete($user->get('user')['id']); // Delete user
```

### Authy Token

[](#authy-token)

Get Authy token instance and interact with it:

```
$authyToken = app('rinvex.authy.token');
$smsTokenSent = $authyToken->send($user->get('user')['id'], 'sms'); // Send SMS token
$callTokenStarted = $authyToken->send($user->get('user')['id'], 'call'); // Start automated call
$tokenVerified = $authyToken->verify(54321, $user->get('user')['id']); // Verify token
```

### Intuitive Responses

[](#intuitive-responses)

Work Intuitively with Authy responses:

```
$body = $tokenVerified->body(); // Get all response body
$code = $tokenVerified->statusCode(); // Get response status code
$succeed = $tokenVerified->succeed(); // Check whether respose is a success
$failed = $tokenVerified->failed(); // Check whether respose is a failure
$message = $tokenVerified->message(); // Get response message
$item = $tokenVerified->get('item'); // Get response body item
$errors = $tokenVerified->errors(); // Get response errors
```

> **Note:** All authy requests return authy response, with a unified interface for your convenience, so you can interact with all responses the same way as above.

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

[](#installation)

1. Install the package via composer:

    ```
    composer require rinvex/laravel-authy
    ```
2. If you don't have the following lines already, add them to your `config/services.php` file, before the end of the array:

    ```
    'authy' => [
        'secret' => env('AUTHY_SECRET'),
    ],
    ```
3. If you haven't already: Register an [Authy](https://www.authy.com) account -&gt; Sign in -&gt; Access [dashboard](https://dashboard.authy.com) -&gt; Create new application -&gt; Copy your API Secret key
4. If you don't have the following lines already, add them to your project's `.env` file, at the end:

    ```
    AUTHY_SECRET=AuthySecretKey
    ```

    > **Note:** make sure to replace `AuthySecretKey` with your key from the previous step.
5. Done! You can refer to [Usage](#usage) again.

Upgrade
-------

[](#upgrade)

- **Upgrading To `v2.x` From `v1.x`**

    API implementation is 100% backward compatible, but sandbox API has been dropped since it's officially deprecated. Also note that PHP7 is now required. Lastly the config options has been changed from `services.authy.mode`, `services.authy.keys.production`, and `services.authy.keys.sandbox` to only one key `services.authy.secret` for ease of use and consistency, accordingly the environment variables `AUTHY_MODE`, `AUTHY_PRODUCTION_KEY`, and `AUTHY_SANDBOX_KEY` are replaced with only one environment variable `AUTHY_SECRET`.

Changelog
---------

[](#changelog)

Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

Support
-------

[](#support)

The following support channels are available at your fingertips:

- [Chat on Slack](https://bit.ly/rinvex-slack)
- [Help on Email](mailto:help@rinvex.com)
- [Follow on Twitter](https://twitter.com/rinvex)

Contributing &amp; Protocols
----------------------------

[](#contributing--protocols)

Thank you for considering contributing to this project! The contribution guide can be found in [CONTRIBUTING.md](CONTRIBUTING.md).

Bug reports, feature requests, and pull requests are very welcome.

- [Versioning](CONTRIBUTING.md#versioning)
- [Pull Requests](CONTRIBUTING.md#pull-requests)
- [Coding Standards](CONTRIBUTING.md#coding-standards)
- [Feature Requests](CONTRIBUTING.md#feature-requests)
- [Git Flow](CONTRIBUTING.md#git-flow)

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within this project, please send an e-mail to [help@rinvex.com](help@rinvex.com). All security vulnerabilities will be promptly addressed.

About Rinvex
------------

[](#about-rinvex)

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

Trademarks
----------

[](#trademarks)

- [Authy™](https://www.authy.com) is a trademark of [Twilio Inc.](https://www.twilio.com)
- [Laravel™](https://laravel.com) is a trademark of [TAYLOR OTWELL](http://taylorotwell.com)

License
-------

[](#license)

This software is released under [The MIT License (MIT)](LICENSE).

(c) 2016-2022 Rinvex LLC, Some rights reserved.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~124 days

Recently: every ~214 days

Total

20

Last Release

1104d ago

Major Versions

v5.1.0 → v6.0.02019-09-22

v6.0.1 → v7.0.02020-03-15

v7.1.0 → v8.0.02020-12-22

v8.0.1 → v9.0.02021-08-22

v9.1.0 → v10.0.02023-01-08

PHP version history (8 changes)v0.0.1PHP &gt;=5.6.4

v2.0.0PHP ^7.0.0

v3.0.0PHP ^7.1.3

v5.0.0PHP ^7.2.0

v7.0.0PHP ^7.4.0

v8.0.1PHP ^7.4.0 || ^8.0.0

v9.0.0PHP ^8.0.0

v10.0.0PHP ^8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e54af04bcacb96e00894621335f88df7ed9895b6cc245deffdc9830a21cfe29?d=identicon)[Omranic](/maintainers/Omranic)

---

Top Contributors

[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (157 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![Rattone](https://avatars.githubusercontent.com/u/7362607?v=4)](https://github.com/Rattone "Rattone (1 commits)")[![Rowayda-Khayri](https://avatars.githubusercontent.com/u/17392277?v=4)](https://github.com/Rowayda-Khayri "Rowayda-Khayri (1 commits)")

---

Tags

authylaravelphonephpsmstwiliotwo-factor-authenticationmessagelaravelsecurityAuthenticationtokenphonesmsautomatedverificationregistertwofactorauthycallrinvex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rinvex-laravel-authy/health.svg)

```
[![Health](https://phpackages.com/badges/rinvex-laravel-authy/health.svg)](https://phpackages.com/packages/rinvex-laravel-authy)
```

###  Alternatives

[rinvex/authy

Rinvex Authy is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

35188.4k1](/packages/rinvex-authy)[laravel-notification-channels/authy

Authy notification channel for Laravel, with the ability to send in-app, sms, and call verification tokens.

5746.6k1](/packages/laravel-notification-channels-authy)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[salehhashemi/laravel-otp-manager

Laravel OTP manager

18713.2k](/packages/salehhashemi-laravel-otp-manager)[awes-io/auth

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

3826.7k1](/packages/awes-io-auth)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
