kauth is JWT API Authentication ( jwt-auth ) for laravel
code4mk/kauth is a Laravel package for kauth is jwt api authentication ( jwt-auth ) for laravel.
It currently has 14 GitHub stars and 121 downloads on Packagist (latest version 3.0.1).
Install it with composer require code4mk/kauth.
Discover more Laravel packages by code4mk
or browse all Laravel packages to compare alternatives.
Last updated

kauthkauth is JWT API Authentication ( jwt-auth ) for laravel
you can install kauth package by command
composer require code4mk/kauth
php artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=config
php artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=migations
config\kauth.php
set token_header_name that you can use with guzzle or axios header
default token_header_name name is tokon
Kauth::attempt() functions// guard name will be user table name
Kauth::guard("users")
// laravel socialite system
// credential will be only email
Kauth::guard("users")->socialite()
->attempt(["email"=>"[email protected]"]);
// your all desired credentials
// password credentail need
Kauth::guard("users")
->attempt(["email"=>"[email protected]","password"=>1234])
~ attempt() return a jwt token which you pass with request header (ex:axios header)
usernames describe which columns you want to match for usernameattempt(["usernames"=>["id","email","name"],"username"=>"request query for username","password=>123456"]);
Kauth::check();
Kauth::id();
Kauth::refreshToken()
Kauth::logout();
Kauth::logoutOtherDevices();