PHPackages                             shahriaramin/auth-sdk-supporting-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. shahriaramin/auth-sdk-supporting-api

ActiveProject[Framework](/categories/framework)

shahriaramin/auth-sdk-supporting-api
====================================

Supporting api for Auth SDK Package Library

1.0.0(1y ago)06MITPHPPHP ^8.2

Since Sep 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Shahriar-Amin-Joy/PHP-Authentication-SDK-Supporting-API-s)[ Packagist](https://packagist.org/packages/shahriaramin/auth-sdk-supporting-api)[ RSS](/packages/shahriaramin-auth-sdk-supporting-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

Supporting API for Auth SDK
===========================

[](#supporting-api-for-auth-sdk)

Project Title
-------------

[](#project-title)

Supporting API for Auth SDK

Project Description
-------------------

[](#project-description)

This API supports the **Auth SDK** by providing the backend services necessary for user authentication, token management, OAuth integration, and role management. It is built using Laravel and is designed to handle various aspects of user authentication, including the generation and validation of JWT tokens, handling OAuth provider interactions, and managing user roles.

Table of Contents
-----------------

[](#table-of-contents)

- [Project Title](#project-title)
- [Project Description](#project-description)
- [Table of Contents](#table-of-contents)
- [Project Overview](#project-overview)
    - [Key Components](#key-components)
    - [Setup Instructions](#setup-instructions)
        - [Install Dependencies](#install-dependencies)
        - [Configure Environment Variables](#configure-environment-variables)
        - [Generate Application Key](#generate-application-key)
        - [Run Database Migrations](#run-database-migrations)
        - [Start the API Server](#start-the-api-server)
- [API Endpoints](#api-endpoints)
- [Conclusion](#conclusion)

Project Overview
----------------

[](#project-overview)

The Supporting API for Auth SDK provides essential backend services for user authentication, role management, and OAuth integrations. The API is built on the Laravel framework and ensures secure handling of user data and tokens. It includes various services and components designed to work seamlessly with the Auth SDK.

### Key Components

[](#key-components)

- **OAuthService**

    - Handles OAuth-related functionality, including redirecting to the provider, processing provider callbacks, and managing OAuth tokens.
- **AuthProviderInterface**

    - Defines a standardized contract for authentication providers, ensuring a consistent approach across different providers.
- **ExceptionHandler**

    - Centralized exception handling for the API, ensuring consistent and informative error responses.
- **User Registration**

    - Manages the creation of new user accounts with validation and error handling.
- **User Login**

    - Authenticates users, generates JWT access and refresh tokens, and handles authentication errors.
- **Token Refresh**

    - Allows users to refresh their access tokens using valid refresh tokens.
- **Role Management**

    - Facilitates the creation and management of user roles with proper validation and error handling.
- **User**

    - Represents the user entity, including necessary attributes and relationships for user management.
- **UserToken**

    - Manages user tokens, including generation, storage, updating, and refreshing.

### Setup Instructions

[](#setup-instructions)

Follow these steps to set up and run the Supporting API:

#### Install Dependencies

[](#install-dependencies)

Use Composer to install the required PHP dependencies:

`composer install`

#### Configure Environment Variables

[](#configure-environment-variables)

Create a new `.env` file from the provided example:

`cp .env.example .env`

Edit the `.env` file to include your specific configuration settings, such as database credentials and API keys.

#### Generate Application Key

[](#generate-application-key)

Generate a unique application key for your Laravel application:

`php artisan key:generate`

#### Run Database Migrations

[](#run-database-migrations)

Set up the database by running the necessary migrations:

`php artisan migrate`

#### Start the API Server

[](#start-the-api-server)

Launch the server to make the API operational:

`php artisan serve`

The API will be accessible at `http://localhost:8000` or your specified base URL.

API Endpoints
-------------

[](#api-endpoints)

### Authentication Endpoints

[](#authentication-endpoints)

- **POST /register**: Register a new user.
- **POST /login**: Authenticate a user and return a JWT token.
- **POST /add-user-role**: Add a role to a user (Admin access required).
- **POST /auth/refresh**: Refresh an access token using a valid refresh token.

### OAuth Endpoints

[](#oauth-endpoints)

- **POST /oauth/refresh**: Refresh an access token using a valid OAuth refresh token.
- **GET /auth/{provider}**: Redirect to the OAuth provider for authentication.
- **GET /auth/{provider}/callback**: Handle the callback from the OAuth provider.

Conclusion
----------

[](#conclusion)

The Supporting API for Auth SDK provides a robust and secure backend solution for managing user authentication, token handling, and OAuth integrations. By following the setup instructions, you can quickly deploy and utilize this API to handle various authentication and authorization scenarios within your applications. For any questions or issues, please refer to the documentation or reach out to the maintainers for support.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

613d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6988a0ebd2eeecdac3be3f08ae01c39192a5ae9531bddf6c014254d6ad28290?d=identicon)[Joy01](/maintainers/Joy01)

---

Top Contributors

[![Shahriar-Amin-Joy](https://avatars.githubusercontent.com/u/175284449?v=4)](https://github.com/Shahriar-Amin-Joy "Shahriar-Amin-Joy (4 commits)")[![Shahriar075](https://avatars.githubusercontent.com/u/88609195?v=4)](https://github.com/Shahriar075 "Shahriar075 (1 commits)")

---

Tags

frameworklaravel

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/shahriaramin-auth-sdk-supporting-api/health.svg)

```
[![Health](https://phpackages.com/badges/shahriaramin-auth-sdk-supporting-api/health.svg)](https://phpackages.com/packages/shahriaramin-auth-sdk-supporting-api)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
