Skip to content

drago-ex/project-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

213 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drago Project Auth

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-tools.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 authentication 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\Sign\RequireLogged;
}

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-tools.commands. If drago-ex/project-tools is installed, you can run them from the project root:

php vendor/bin/drago-setup

About

💡 Authentication and user access package for the Drago project.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors