Download the PHP package skofi/laravel-jwt-auth without Composer
On this page you can find all versions of the php package skofi/laravel-jwt-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skofi/laravel-jwt-auth
More information about skofi/laravel-jwt-auth
Files in skofi/laravel-jwt-auth
Package laravel-jwt-auth
Short Description JWT Authentication with Mail confirmation for Laravel
License MIT
Informations about the package laravel-jwt-auth
Laravel JWT Authorization
This repository provides full functionality for authorization and mail confirmation using JWT (JSON Web Tokens) in a Laravel application.
Installation
To set up JWT authentication and mail confirmation, follow these steps:
-
Run the following command to install the
skofi/laravel-jwt-auth
package: -
Run the following command to install JWT authentication:
- Publish the vendor for JWT authentication:
Middleware for JWT
Add the following middleware for JWT authentication in your Kernel.php
:
User Model Implementation
Implement the JWTSubject interface in the User model as follows:
Password Reset Route Configuration
In the AuthServiceProvider of the boot() method, add the following code to configure the password reset route to redirect to the frontend URL:
Time-to-live JWT
You can define variables in your .env
file to customize the token's time-to-live (TTL) settings:
JWT_TTL
denotes the standard token lifetime in minutes.JWT_REMEMBER_TTL
represents the token's lifetime when the 'Remember me' option is selected, also in minutes.
Generate secret key
This key serves as the signature for your tokens, and the process will depend on the algorithm you choose to use.
Usage
- Once the setup is complete, you can use JWT authentication for user authorization.
- Password reset links will be generated based on the configured
FRONTEND_URL=
in your.env
.
Contribution
Feel free to contribute by opening issues or submitting pull requests.
License
This project is licensed under the MIT License.
All versions of laravel-jwt-auth with dependencies
tymon/jwt-auth Version ^2.0
illuminate/console Version ^10.0
illuminate/support Version ^10.0
illuminate/filesystem Version ^10.0