PHPackages                             dez-php/phalcon-auth - 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. dez-php/phalcon-auth

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

dez-php/phalcon-auth
====================

Auth Component for Phalcon 2 Framework

v0.2.3(10y ago)51792MITPHPPHP &gt;=5.5

Since Nov 6Pushed 10y ago3 watchersCompare

[ Source](https://github.com/dez-php/phalcon-auth)[ Packagist](https://packagist.org/packages/dez-php/phalcon-auth)[ RSS](/packages/dez-php-phalcon-auth/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (13)Used By (0)

phalcon-auth
============

[](#phalcon-auth)

### Auth Component for Phalcon 2.x Framework

[](#auth-component-for-phalcon-2x-framework)

\#Usage

Register Auth in dependency injection container

```
include_once '../vendor/autoload.php';

$container  = new \Phalcon\Di\FactoryDefault();

$container->set('auth', function(){

    // Pass session adapter into Auth
    $auth   = new \PhalconDez\Auth\Auth(
        new \PhalconDez\Auth\Adapter\Session()
    );

    // Pass empty instance of Credentials Model implement PhalconModel
    $auth->setCredentialsModel(
        new \PhalconDez\Auth\Model\Credentials()
    );

    // Pass empty instance of Session Model implement PhalconModel
    $auth->setSessionModel(
        new \PhalconDez\Auth\Model\Session()
    );

    // Run initialize
    $auth->initialize();

    return $auth;
});
```

and then fetch auth from container

```
/** @var \PhalconDez\Auth\Auth $auth */
$auth   = $container->get('auth');
```

authorization

```
try{
    $auth->authenticate('test@gmail.com', 'qwerty');
}catch (\Exception $e){
    echo "You have some errors: {$e->getMessage()}";
}
```

creating new credentials

```
try{
    $auth->authenticate($email, $password);
}catch (\Exception $e){
    $auth->create($email, $password);
    $container->get('response')->redirect('auth-page');
}
```

verify password

```
if($auth->isUser() && $auth->getAdapter()->verifyPassword('qwerty') === true){
    echo 'Password is corrected';
}
```

check user user authorization

```
if($auth->isGuest() === true){
    echo 'You are non-authorized user';
}

if($auth->isUser() === true){
    echo 'You are authorized user';
}
```

get some authorized user data

```
if($auth->isUser() === true){
    $userModel  = $auth->getUser();
    echo "Hello, {$userModel->getEmail()}. You was registered at {$userModel->getCreatedAt()}";
}
```

\#Issues and pull-request

\####I will be glad of your criticism, tasks, bugs and pull-request.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~19 days

Recently: every ~29 days

Total

12

Last Release

3676d ago

### Community

Maintainers

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

---

Top Contributors

[![dez-php](https://avatars.githubusercontent.com/u/13887222?v=4)](https://github.com/dez-php "dez-php (1 commits)")

---

Tags

authphalconPhalcon Authphp phalcon

### Embed Badge

![Health badge](/badges/dez-php-phalcon-auth/health.svg)

```
[![Health](https://phpackages.com/badges/dez-php-phalcon-auth/health.svg)](https://phpackages.com/packages/dez-php-phalcon-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.7k51.8M370](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.7k147.0M290](/packages/league-oauth2-server)[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k18.6M64](/packages/lab404-laravel-impersonate)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

41021.9M91](/packages/auth0-auth0-php)[kreait/firebase-tokens

A library to work with Firebase tokens

23945.4M18](/packages/kreait-firebase-tokens)[cottacush/phalcon-user-auth

User Auth is a library for managing user credentials

101.7k](/packages/cottacush-phalcon-user-auth)

PHPackages © 2026

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