dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 141 forks source link

'config/auth.php' file #27

Closed miguelsmuller closed 7 years ago

miguelsmuller commented 7 years ago

I'm using lumen 5.4 and I'm having a hard time making an initial configuration, I have no idea where the 'config/auth.php' file is.

Is it because of the laravel version?

DCdeBrabander commented 7 years ago

You will need to create the auth.php file yourself in the config/ directory :-) If you don't have a config directory already, you will need to create the directory in your app's root-folder.

An example of the contents:

 return [
        'defaults' => [
            'guard' => 'api',
            'passwords' => 'users',
        ],

        'guards' => [
            'api' => [
                'driver' => 'passport',
                'provider' => 'users',
            ],
        ],

        'providers' => [
            'users' => [
                'driver' => 'eloquent',
                'model' => \App\User::class
            ]
        ]
    ];

Happy coding :)

(btw have you already looked at https://github.com/dusterio/lumen-passport/issues/9 ?)