oskonnikov/laravel-djangoauth-driver

An authentication driver for Laravel5 which allows to authenticate users using their legacy Django PBKDF2, forked version

v2.0 2022-07-03 21:36 UTC

This package is auto-updated.

Last update: 2024-10-30 01:59:24 UTC


README

An authentication driver for Laravel5 which allows to authenticate users using their legacy Django PBKDF2 passwords.

Usage

Add the following service provider to the providers section of config/app.php :

Jobinja\Djangoauth\DjangoauthServiceProvider::class

Then change your auth driver to djangoauth in config/auth.php.

If you prefer to use database driver instead of eloquent use djangoauth_database instead of djangoauth .

Refreshing passwords on first login

By default after the first login of the user using a password, user's password is rehashed based on your laravel hasher contract. If you don't wat this you can disable it by setting rehash_django to false in config/auth.php :

// auth.php
//...
'rehash_django' => false,
//...

Password field size

Default Laravel5 migration for users table uses VARCHAR(60) for password field you should increment it to 100 as Django password fields take more space.

Tests for hasher contract

Clone the project then run vendor/bin/phpunit.