Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shuvroroy/laravel-jwt-api
https://github.com/shuvroroy/laravel-jwt-api
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shuvroroy/laravel-jwt-api
- Owner: shuvroroy
- Created: 2019-07-13T16:11:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T11:18:33.000Z (almost 2 years ago)
- Last Synced: 2023-03-05T06:40:23.559Z (over 1 year ago)
- Language: PHP
- Size: 1.26 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel With JWT Authentication Using TDD
Basically this is a starter kit for you to integrate Laravel with JWT Authentication
## Quick Start
- Clone this repo or download it's release archive and extract it somewhere
- You may delete .git folder if you get this code via git clone
- Run `composer install`
- Configure your .env file for authenticating via database and mail server for email verification
- Run `php artisan key:generate`
- Run `php artisan jwt:secret`
- Run `php artisan serve`
- Site url `http://localhost:8000`## Main Features
For each controller there's an already setup route in `routes/api.php` file:
* `POST api/login`, to do the login and get your access token;
* `POST api/register`, to create a new user into your application;
* `POST api/email/verify/{user}`, to verify a user with email verification;
* `POST api/email/resend`, to resend email verification link to email;
* `POST api/password/email`, to recover your credentials;
* `POST api/password/reset`, to reset your password after the recovery;
* `POST api/logout`, to log out the user by invalidating the passed token;
* `GET api/me`, to get current user data with valid token;
* `POST api/settings/profile`, to update user profile with valid token;
* `GET api/settings/password`, to update user password with valid token;## Testing
```bash
vendor/bin/phpunit
```