php-api-auth
php-api-auth copied to clipboard
Single file PHP script that adds authentication to a PHP-CRUD-API project
improvements to be discussed
It seems the login is done by hard coding! 'validate' => function ($username, $password) { return $username == 'admin' && $password == 'admin'; }, While I expect it does the...
Trying to get auth.php to work I get this error: text: "Could not find configuration: default / default" This is the code I'm using: http.post('/auth.php', { username: username, password: password...
I cannot find any function in the auth.php for logout, how can I logout after a login?