Download the PHP package elytica/elytica-socialite without Composer
On this page you can find all versions of the php package elytica/elytica-socialite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package elytica-socialite
Elytica Socialite Driver
Laravel Socialite driver for Elytica authentication.
- Requirements
- Installation
- Configuration
- User model
- Usage
- Scopes
- Refreshing tokens
- Custom base URL
- Testing
Requirements
- PHP 8.2+
- Laravel 11, 12, or 13
laravel/socialite^5.14
The package is auto-discovered — no manual provider registration needed.
Installation
Publish the config and migrations:
The migration adds the following nullable columns to your users table and makes password nullable (users authenticated via Elytica won't have a local password):
| Column | Type |
|---|---|
elytica_service_id |
unsigned bigint |
elytica_service_token |
text |
elytica_service_refresh_token |
text |
elytica_service_token_expires_at |
timestamp |
Configuration
Add the following to your .env file:
The package merges its config into Laravel's config/services.php under the elytica_service key, so you can also override values there:
User model
Add the Elytica columns to your User model so they can be mass-assigned and cast properly:
Usage
Scopes
The driver requests user:read by default. You can request additional scopes using .scopes():
Available scopes: user:read, projects:read, projects:write, projects:delete,
jobs:read, jobs:write, jobs:delete, files:read, files:write, files:delete,
applications:read, mcp:use.
Refreshing tokens
Access tokens expire after 15 days; refresh tokens expire after 30 days. Use the stored refresh token to mint a new access token without prompting the user to log in again:
refreshToken() returns the decoded JSON response as an array (access_token, refresh_token, expires_in, token_type, ...). It throws JsonException on a malformed response and GuzzleHttp\Exception\RequestException on transport/HTTP errors — handle these in your refresh flow.
Refreshing proactively
A common pattern is a middleware that refreshes the access token before it expires:
Custom base URL
The driver defaults to https://service.elytica.com. Override it via ELYTICA_SERVICE_BASE_URL, or programmatically:
The base URL must use https:// — passing an http:// URL throws InvalidArgumentException. Trailing slashes are stripped automatically.
Testing
To collect coverage you need Xdebug or PCOV installed; then:
CI runs the suite across the supported PHP × Laravel matrix — see .github/workflows/tests.yml.
All versions of elytica-socialite with dependencies
illuminate/support Version ^11.9|^12.0|^13.0
laravel/socialite Version ^5.14