https://github.com/nahidulhasan/laravel-passport-api
Laravel with Passport Authentication for API development
https://github.com/nahidulhasan/laravel-passport-api
api authentication laravel passport
Last synced: about 1 year ago
JSON representation
Laravel with Passport Authentication for API development
- Host: GitHub
- URL: https://github.com/nahidulhasan/laravel-passport-api
- Owner: nahidulhasan
- Created: 2018-10-07T06:35:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T17:45:52.000Z (about 4 years ago)
- Last Synced: 2025-04-01T08:44:45.852Z (over 1 year ago)
- Topics: api, authentication, laravel, passport
- Language: PHP
- Homepage:
- Size: 359 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Laravel with Passport Authentication
Basically this is a starter kit for you to integrate Laravel with Passport 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 or composer update
- Configure your .env file for authenticating via database
- Run docker-compose build
- Run docker-compose up -d
- Run the following command to populate database tables.
```bash
$ docker-compose exec php php artisan migrate
```
- Visit `localhost:9008`
> **Note:**
- You can now use:
- ```POST /api/auth/signup``` –> Create user
```json
{
"name" : "Test User ",
"email" : "test@gmail.com",
"password" : "secret",
"password_confirmation" : "secret"
}
```
- ```POST /api/auth/login``` –> with email and password, obtain a access token
- ```GET /api/auth/user``` –> Get user info
And remember, Passport requires you to provide the token as a header.