PHPackages                             hichemtab-tech/tokens-validation - 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. hichemtab-tech/tokens-validation

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

hichemtab-tech/tokens-validation
================================

TokensValidation is a PHP library for secure authentication and authorization in web applications. It generates dynamic tokens for user login, password reset, and email confirmation. The library is ideal for software that requires secure user authentication and authorization.

4.0.0(2y ago)1143MITPHPPHP &gt;=8.0

Since Apr 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/HichemTab-tech/tokens-validation)[ Packagist](https://packagist.org/packages/hichemtab-tech/tokens-validation)[ RSS](/packages/hichemtab-tech-tokens-validation/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (38)Used By (0)

[![Logo](https://github.com/HichemTab-tech/tokens-validation/raw/master/meta-data/picture.png)](https://github.com/HichemTab-tech/tokens-validation/blob/master/meta-data/picture.png)

TokensValidation
================

[](#tokensvalidation)

TokensValidation is a PHP library designed to generate and verify authentication and confirmation tokens dynamically. It is ideal for web applications and software that require secure user authentication and authorization. The library generates authentication and confirmation tokens that can be used to log in users, reset passwords, and confirm email addresses.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Features](#features)
3. [Usage](#usage)
    1. [Authentication Tokens](#authentication-tokens)
        1. [Using Cookies](#1-using-cookies)
        2. [Handling the Token Yourself](#2-handling-the-token-yourself)
        3. [Overriding the Cookie Handler Methods](#3-overriding-the-cookie-handler-methods)
    2. [Fingerprint](#fingerprint)
    3. [Confirmation Tokens](#confirmation-tokens)
        1. [By URL](#1--by-url)
        2. [By Typing](#2--by-typing)
        3. [WhatFor Field](#whatfor-field)
        4. [Delete after check](#delete-after-check)
        5. [Single Token Per Period](#single-token-per-period)
    4. [Tokens Generator](#tokens-generator)
    5. [Token Expiration](#token-expiration)
    6. [Invitations](#invitations)
    7. [In Laravel](#in-laravel)
    8. [Errors Identification](#errors-identification)
4. [License](#license)

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

[](#installation)

> ℹ️ **INFO**: This version is compatible with PHP 8 and above. If you are using PHP 7, you must install version [3.2.2](https://github.com/HichemTab-tech/tokens-validation/tree/3.2.2) of this library.

The TokensValidation library can be installed via Composer by running the following command:

```
  composer require hichemtab-tech/tokens-validation
```

Features
--------

[](#features)

- Authenticate the user after the browser closed without a password
- Generate custom confirmation codes with expiration delay.
- Create invitation tokens to do some actions.
- Flexibility of usage
- Security &amp; Encryption

Usage
-----

[](#usage)

To use the library, you first need to set up the database connection parameters by calling the following methods:

```
