Download the PHP package tecnomanu/unilogin-laravel-lumen without Composer

On this page you can find all versions of the php package tecnomanu/unilogin-laravel-lumen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package unilogin-laravel-lumen

UniLogin

UniLogin is a Laravel/Lumen package that allows users to log in to a web application through a magic link. This means that the user does not need to remember a password to log in, but simply clicks on a link that is sent to their email.

Index

  1. Introduction
  2. Installation
  3. Configuration
  4. Usage
  5. API
  6. Advanced Customization
  7. Error Handling
  8. Contribute

Introduction

UniLogin allows you to implement magic link login in your Laravel or Lumen application. This type of login is based on sending a link to the user's email that, when clicked, automatically logs in the user to your application.

Installation

The installation of UniLogin is very simple. You can install it in a Laravel or Lumen application:

Laravel

  1. Run the following command:

    composer require tecnomanu/unilogin

  2. Publish the configuration file and views:

    php artisan vendor:publish --provider="Tecnomanu\UniLogin\LaravelServiceProvider"

Lumen

  1. Run the following command:

    composer require tecnomanu/unilogin

  2. Copy the configuration file and views:

    php artisan unilogin:copy-views

Configuration

Once the package is installed, you can configure it through the config/unilogin.php file or directly in your .env file.

Configuración adicional para Lumen

Si estás utilizando Lumen, necesitarás agregar algunas configuraciones adicionales para que este paquete funcione correctamente.

Añade las siguientes líneas en tu archivo bootstrap/app.php:

Usage

  1. Middleware

To use the UniLogin magic link, you need to use the middleware that comes with the package. You can add the middleware in your web.php or api.php routes file:

API

UniLogin comes with several pre-configured routes that handle the different stages of the magic link login process. Here they are:

Advanced Customization

As you progress in the integration and use of the UniLogin package, you may find the need to make adjustments that better suit your project. In this section, we will explore some of the most common ways to customize UniLogin.

  1. Middleware

    The UniLogin package comes with a custom middleware: SuccessTokenMiddleware. This middleware processes the SUCCESS type tokens and adds the user's email to the request. You might need to customize this middleware, for example, if you need to add more fields to the request.

    Here's an example of how you could customize this middleware to add a 'company_id' field to the request:

  2. Views

    Views are another area where you might want to customize UniLogin. The error, invalid session and success views can be customized according to the needs of your project. You can copy the views into your application and make the necessary changes using the unilogin:copy-views command.

Error Handling

Error handling is essential for providing a smooth and consistent user experience. The UniLogin package comes with a built-in error handling system, which throws different types of exceptions depending on the error occurred.

In most cases, the UniLogin package returns a JSON response with a description of the error and an HTTP status code. For example, if a token has expired, it will return a JSON response with the status 'error' and the corresponding message.

If you need a more custom error handling system, you could consider editing the functions that throw the exceptions in the middleware.

Contribute

If you want to contribute to the development of UniLogin, you can follow these steps:

  1. Fork the repository on GitHub.
  2. Clone your fork to your local machine.
  3. Create a new branch in your local repository.
  4. Make your changes in the new branch.
  5. Push the changes to your fork on GitHub.
  6. Open a pull request from your fork to the main UniLogin repository.
  7. After review and any necessary discussions, your changes may be merged into the main branch.

Before opening a pull request, please make sure to check the existing issues and pull requests to avoid duplication. Also, please follow the existing coding standards and conventions.

Thank you for your interest in contributing to UniLogin!


All versions of unilogin-laravel-lumen with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/support Version ^7.0|^8.0|^9.0
illuminate/database Version ^7.0|^8.0|^9.0
illuminate/events Version ^7.0|^8.0|^9.0
illuminate/mail Version 7.0|^8.0|^9.52
illuminate/notifications Version 7.0|^8.0|^9.0
firebase/php-jwt Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tecnomanu/unilogin-laravel-lumen contains the following files

Loading the files please wait ....