Skip to content

Using custom users table and provider #8125

Closed Answered by BeauvR
ilicmarko asked this question in Troubleshooting
Discussion options

You must be logged in to vote

Hi, I encountered the same issue and found a workaround.

I included the following guard in the auth.php:

        'statamic' => [
            'driver' => 'session',
            'provider' => 'statamic',
        ],

I also added the subsequent provider to the auth.php:

        'statamic' => [
            'driver' => 'eloquent',
            'model' => App\Models\StatamicUser::class,
        ],

Furthermore, I created a custom model for the table which extends the Illuminate\Foundation\Auth\User.

The only modification I made was to the CP authentication guard in the config/statamic/users.php, setting it to statamic.

I hope this solution will work for others as well.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joshuablum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants