Coder Social home page Coder Social logo

irabbi360 / laravel-api-starter Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 283 KB

Laravel API JWT Starter is a "starter kit" you can use to build your first API in seconds. It is based on larave 10!

PHP 77.41% JavaScript 0.22% Blade 22.37%
laravel-api-auth laravel-api-authentication laravel-api-boilerplate laravel-boilerplate laravel-jwt laravel-jwt-auth laravel-jwt-authentication laravel-api-starter

laravel-api-starter's Introduction

Laravel JWT Rest API Starter

This repository contains a Laravel 10 with JWT authentication boilerplate using the [tymon/jwt-auth](https://github.com/tymondesigns/jwt-auth) package.

Project Image

License: MIT

Features

  • JWT authentication (login, register, password reset, email verification)
  • Profile updating
  • Password changing
  • Product CRUD

Installation

  1. cp .env.example .env
  2. composer install
  3. php artisan jwt:secret (generate a secret key that will be used to sign your tokens)
  4. php artisan migrate:fresh --seed

Authentication

In order to authenticate, you have to log in using valid credentials. User data and an access token will be returned. You can use this access token to do subsequent requests to the API.

The access token has a TTL of 1 hour until it expires. The access token should be refreshed within this time window to avoid becoming unauthenticated.

The access token can be refreshed for two weeks. After that, the user has to log in again.

Contributing

Feel free to open a pull request if you want to contribute to this project. All contributions / suggestions are welcome โœจ

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.