drago-ex/project-auth

Authentication and user access package for the Drago project.

Maintainers

Package info

github.com/drago-ex/project-auth

Type:drago-project-resource

pkg:composer/drago-ex/project-auth

Statistics

Installs: 162

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.6 2026-06-03 18:14 UTC

README

Authentication and user access package for the Drago project. This package provides a complete authentication layer including user login, registration, password recovery and access control. It is designed as a modular extension for projects built on top of the Drago ecosystem and Nette framework.

License: MIT PHP version Coding Style

Requirements

  • PHP >= 8.3
  • Nette Framework
  • Composer
  • Bootstrap
  • Naja
  • Node.js
  • Drago Project core packages

Installation

composer require drago-ex/project-auth

Project files

File copying is handled automatically by drago-ex/project-tools, which must be installed in your project. Without it, copy the files manually according to the copy section in this package's composer.json. To skip this package, set "skip": true under extra.drago-project.packages.<package-name> in your root composer.json.

Features

  • User authentication (sign in / sign out)
  • User registration (sign up)
  • Password recovery and reset
  • User identity handling
  • Integration with Nette Security and DI
  • Ready-to-use backend UI components

Adds a new user to the database

Hashes the password, generates a token, and ensures the email is unique.

php vendor/bin/create-user <username> <email> <password>

Secure access to the section

final class SecurePresenter extends Presenter
{
    use App\UI\Backend\Sign\UserRequireLogged;
}

Generate permission provider

If you use project ACL (drago-ex/permission), you can generate a module permission class:

php vendor/bin/create-auth-permission

Database migration

php vendor/bin/migration db:migrate vendor/drago-ex/project-auth/migrations

Automated setup

This package exposes setup commands in composer.json under extra.drago-project.commands. If drago-ex/project-tools is installed, you can run them from the project root:

php vendor/bin/drago-setup