narakode/fineauth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

narakode/fineauth

Composer 安装命令:

composer require narakode/fineauth

包简介

A simple authentication package for Laravel REST APIs.

README 文档

README

A simple authentication package for Laravel REST APIs.

Features

  • Login
  • Access Tokens
  • Refresh Tokens
  • Current Authenticated User

Requirements

  • PHP ^8.3
  • Laravel ^13
  • Laravel Sanctum ^4.3

Installation

Install the package:

composer require narakode/fineauth

This package requires Laravel Sanctum. If you haven't installed it yet, run:

php artisan install:api

Usage

Register the authentication routes in your routes file (for example, routes/api.php):

use Narakode\FineAuth\FineAuth;

FineAuth::routes();

You can verify that the routes have been registered by listing your application's routes:

php artisan route:list

# Example:
# POST  api/login

Endpoints

Login

The POST /login endpoint requires the following request parameters:

  • email
  • password

The package uses Laravel's authentication system to validate the provided credentials.

If the credentials are invalid, it returns a 401 Unauthorized response:

{
    "message": "The provided credentials do not match our records."
}

If authentication succeeds, it returns a 200 OK response:

{
    "access_token": "xxxx",
    "user": {
        "id": "xxx",
        "name": "xxx",
        "email": "xxx"
    }
}

A refresh token is also returned as an HTTP cookie named refresh_token with the following attributes:

  • Expires in 1 hour
  • HttpOnly
  • Secure
  • SameSite

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固