hyungjune/reactauth

laravel + react api auth


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require hyungjune/reactauth
$ php artisan preset reactAuth
$ npm install

Usage

  1. config/auth.php의 api driver를 passport로 수정
'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'passport',
            'provider' => 'users',
            'hash' => false,
        ],
    ],
  1. migrate
$ php artisan migrate
  1. passport key generate
$ php artisan passport:install
  1. .env 파일에 email 세팅
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your's
MAIL_PASSWORD=your's
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your's
MAIL_FROM_NAME="${APP_NAME}"

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.