Download the PHP package lifewind/laravel-sso-client without Composer

On this page you can find all versions of the php package lifewind/laravel-sso-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sso-client

LifeWind Laravel SSO Client

API-only SSO authentication for Laravel backends.

This package provides secure JWT-based authentication endpoints for validating OAuth tokens from frontend applications.

๐ŸŒŸ Features

๐Ÿ“‹ Prerequisites: Register Your App in LifeWind Core

Before installing this package, you need an OAuth client registered in LifeWind Core:

  1. Login to the LifeWind Core admin panel at https://lifewind-core.test/admin (or your production URL)
  2. Navigate to OAuth Clients โ†’ Create Client
  3. Fill in:
    • Name: Your app name (e.g. "Atlas")
    • Redirect URI: Your frontend callback URL (e.g. https://your-app.com/sso/callback)
    • Grant Type: Authorization Code
  4. After creation, copy the Client ID and Client Secret โ€” you'll need these for your .env

Tip: For local development, use http://localhost:3001/sso/callback as the redirect URI (adjust port to match your frontend dev server).

๐Ÿš€ Quick Start

1. Installation

2. Configuration

Publish configuration and run migrations:

3. Environment Setup

4. CORS Configuration

Update config/cors.php:

๐Ÿ“ก API Endpoints

The package automatically registers these endpoints:

Method Endpoint Description
POST /sso/validate Validate OAuth code โ†’ return JWT + user
GET /sso/user Get authenticated user (Bearer token)
POST /sso/refresh Refresh JWT token

POST /sso/validate

Exchange OAuth authorization code for JWT token.

Request:

Success Response (200):

Error Response (400):

GET /sso/user

Get current authenticated user information.

Headers:

Success Response (200):

Error Response (401):

POST /sso/refresh

Refresh an existing JWT token.

Headers:

Success Response (200):

๐Ÿ”’ Protecting Routes

Use the built-in middleware to protect your API routes:

๐Ÿ› ๏ธ Using in Controllers

Access the authenticated user in your controllers:

๐Ÿ”ง Advanced Configuration

Custom User Model

If you're using a custom User model:

JWT Configuration

OAuth Scopes

Database Configuration

๐Ÿงช Testing & Debugging

Test Command

Manual Testing

Test the endpoints manually:

๐ŸŒ Frontend Integration

This package is designed for frontend-initiated OAuth flows:

Flow Overview

  1. Frontend redirects user to LifeWind OAuth provider
  2. LifeWind authenticates user and redirects back to frontend
  3. Frontend captures authorization code from callback URL
  4. Frontend sends code to your backend's /sso/validate endpoint
  5. Backend validates code with LifeWind and returns JWT + user data
  6. Frontend stores JWT token for subsequent API requests

For Vue.js Applications

Use our companion Vue.js package:

For Other Frontends

Implement the OAuth flow manually:

๐Ÿšจ Production Checklist

Security Requirements

Example Production Configuration

Performance Optimization

๐Ÿ“‹ Troubleshooting

Common Issues

"Invalid authorization code" error:

CORS errors:

JWT token invalid:

Debug Logging

Enable detailed logging in development:

Check logs at:

๐Ÿ“„ License

MIT License. See LICENSE for details.

๐Ÿค Support


Built for modern API-first applications ๐Ÿš€


All versions of laravel-sso-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/auth Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.5
firebase/php-jwt Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lifewind/laravel-sso-client contains the following files

Loading the files please wait ...