| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
kauth is JWT API Authentication ( jwt-auth ) for laravel
you can install kauth package by command
composer require code4mk/kauthphp artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=config
php artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=migationsconfig\kauth.php
set token_header_name that you can use with guzzle or axios header
default token_header_name name is tokon
// guard name will be user table name
Kauth::guard("users")// laravel socialite system
// credential will be only email
Kauth::guard("users")->socialite()
->attempt(["email"=>"ex@gmail.com"]);// your all desired credentials
// password credentail need
Kauth::guard("users")
->attempt(["email"=>"ex@email.com","password"=>1234])~ attempt() return a jwt token which you pass with request header (ex:axios header)
attempt(["usernames"=>["id","email","name"],"username"=>"request query for username","password=>123456"]);Kauth::check();Kauth::id();Kauth::refreshToken()Kauth::logout();Kauth::logoutOtherDevices();| Back | FazBrowse Home | New Git URL |