Git Product home page Git Product logo

laravel-jwt-auth's Introduction

Laravel_JWT_AUTH

Table of Contents

About

Simple Laravel JWT AUTH. build with Laravel 8, PHP 8, and MariaDB.

Routes API

Route prefix is auth, for detail check at routes/api.php

Method Endpoint
POST /api/auth/register
POST /api/auth/login
GET /api/auth/user-profile
POST /api/auth/refresh
POST /api/auth/logout

How to use

  1. Clone this project
git clone https://github.com/reptr/laravel-jwt-auth /direktori project(htdoc)
  1. Create database

  2. Edit .env

DB_DATABASE= (fill database)
DB_USERNAME= (fill username)
DB_PASSWORD= (fill password)
  1. Composer Install
composer install
  1. Migrate database
php artisan migrate
  1. Generate Key
php artisan key:generate
  1. Generate Secret Key JWT
php artisan jwt:secret

After generated, you can check this key inside the .env file

  1. Finally, Running app
php artisan serve

Screenshoot

  1. User Registration

  1. Login

  1. User Profile

    Make sure fill token the header field Authorization: Bearer Token

  1. JWT Token Refresh

    Make sure fill token the header field Authorization: Bearer Token

  1. Logout

    Make sure fill token the header field Authorization: Bearer Token

License

MIT License © 2021

laravel-jwt-auth's People

Contributors

restuhanputra avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.