Download the PHP package benbjurstrom/otpz without Composer

On this page you can find all versions of the php package benbjurstrom/otpz. 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 otpz

OTPz Screenshot

First Factor One-Time Passwords for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status

This package provides secure first factor one-time passwords (OTPs) for Laravel applications. Users enter their email and receive a one-time code to sign in.

Starter Kits

Laravel + React Starter Kit

  1. New Applications

    Create a new Laravel project using the OTPz + React starter kit with the following command:

    1. Existing Applications:

    You can see a diff of all changes needed to integrate OTPz with the official Laravel + React Starter Kit here: https://github.com/laravel/react-starter-kit/compare/main...benbjurstrom:otpz-react-starter-kit:main

Laravel + Vue Starter Kit

  1. New Applications

    Create a new Laravel project using the OTPz + Vue starter kit with the following command:

    1. Existing Applications:

    You can see a diff of all changes needed to integrate OTPz with the official Laravel + Vue Starter Kit here: https://github.com/laravel/vue-starter-kit/compare/main...benbjurstrom:otpz-vue-starter-kit:main

Laravel + Livewire Starter Kit

  1. New Applications

    Create a new Laravel project using the OTPz + Livewire starter kit with the following command:

    1. Existing Applications:

    You can see a diff of all changes needed to integrate OTPz with the official Laravel + Livewire Starter Kit here: https://github.com/laravel/livewire-starter-kit/compare/main...benbjurstrom:otpz-livewire-starter-kit:main

Installation

1. Install the package via composer:

2. Publish and run the migrations

3. Add the package's interface and trait to your Authenticatable model

4. (Optional) Add the following routes

Not needed with Laravel 12 starter kits. Instead, see the Usage section for examples.

5. (Optional) Publish the views for custom styling

This package publishes the following views:

6. (Optional) Publish the config file

This is the contents of the published config file:

Usage With Breeze

Laravel Breeze Livewire Example

  1. Replace the Breeze provided App\Livewire\Forms\LoginForm::authenticate method with a sendEmail method that runs the SendOtp action. Also be sure to remove password from the LoginForm's properties.

`

  1. Update resources/views/livewire/pages/auth/login.blade.php such that the login function calls our new sendEmail method and redirects to the OTP entry page. You can also remove the password input field in this same file.

Laravel Breeze Inertia Example

  1. Replace the Breeze provided App\Http\Requests\Auth\LoginRequest::authenticate method with a sendEmail method that runs the SendOtp action. Also be sure to remove password from the rules array.

  2. Update the App\Http\Controllers\Auth\AuthenticatedSessionController::store method to call our new sendEmail method and redirect to the OTP entry page.

  3. Remove the password input field from the resources/js/Pages/Auth/Login.vue file.

Everything else is handled by the package components.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of otpz with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0
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 benbjurstrom/otpz contains the following files

Loading the files please wait ....