PHPackages                             cronixweb/bigcommerce-oauth-laravel - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. cronixweb/bigcommerce-oauth-laravel

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

cronixweb/bigcommerce-oauth-laravel
===================================

BigCommerce App authentication made easy.

v4.0(1y ago)122MITPHPPHP ^8.2

Since Mar 8Pushed 8mo agoCompare

[ Source](https://github.com/cronixweb/bigcommerce-oauth-laravel)[ Packagist](https://packagist.org/packages/cronixweb/bigcommerce-oauth-laravel)[ RSS](/packages/cronixweb-bigcommerce-oauth-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (20)Used By (0)

BigCommerce OAuth for Laravel
=============================

[](#bigcommerce-oauth-for-laravel)

 [![Cronix](assets/cronix-logo.svg)](assets/cronix-logo.svg)  ×  [![BigCommerce](assets/bigcommerce-logo.svg)](assets/bigcommerce-logo.svg)

A lightweight, drop‑in Laravel package that implements the full BigCommerce OAuth flow (install, load, uninstall, remove user). Designed to work in small apps and large, complex, multi‑tenant systems alike.

Official docs:

Features
--------

[](#features)

- Install, Load, Uninstall, Remove User routes ready to use.
- Persists store access tokens and user–store relationships.
- Simple Facade API for callbacks, session store selection, and token access.
- Laravel 10 and 11 compatible; PHP 8.2+.

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `^10` or `^11`

Installation
------------

[](#installation)

```
composer require cronixweb/bigcommerce-oauth-laravel
```

The service provider is auto‑discovered.

Publish config, migrations, and views into your app, then run migrations:

```
php artisan vendor:publish --provider="CronixWeb\\BigCommerceAuth\\BigAuthServiceProvider" --tag=config,migrations,views
php artisan migrate
```

Configure
---------

[](#configure)

Set the following environment variables in your Laravel app:

```
BC_CLIENT_ID=your_client_id
BC_SECRET=your_client_secret
BC_REDIRECT_PATH=/       # where to redirect after successful install/load

```

You can also override defaults in `config/bigcommerce-auth.php` (tables, controllers, views).

Routes
------

[](#routes)

This package ships a route file with the following endpoints (prefixed by `auth`):

- `GET /auth/install` → handles OAuth installation
- `GET /auth/load` → verifies signed payload and logs user in
- `GET /auth/uninstall` → uninstall callback
- `GET /auth/remove_user` → remove user callback

Register the package routes once in your application (e.g., in `routes/web.php` or a service provider):

```
use CronixWeb\BigCommerceAuth\BigAuthRoutes;

BigAuthRoutes::register();
```

In the BigCommerce Developer Portal, set your app callback URLs to your app domain:

- Auth Callback URL: `https://your-app.com/auth/install`
- Load Callback URL: `https://your-app.com/auth/load`
- Uninstall Callback URL: `https://your-app.com/auth/uninstall`
- Remove User Callback URL: `https://your-app.com/auth/remove_user`

For an end‑to‑end setup guide and screenshots, see the official documentation:

Database
--------

[](#database)

Published migrations create:

- `stores` (id, hash, access\_token, timestamps, softDeletes)
- `store_has_users` (store\_id, user\_id, timestamps, composite PK)
- Updates `users` to allow nullable `name` and `password` (for SSO‑style accounts)

The default Eloquent model is `CronixWeb\BigCommerceAuth\Models\Store` and can be swapped via config.

Usage
-----

[](#usage)

Hook into lifecycle callbacks and access tokens via the Facade:

```
use CronixWeb\BigCommerceAuth\Facades\BigCommerceAuth as BC;

// In a service provider's boot():
BC::setInstallCallback(function ($user, $store) {
    // e.g., provision tenant resources, set roles
});

BC::setLoadCallback(function ($user, $store) {
    // e.g., initialize per-request context, analytics
});

BC::setUninstallStoreCallBack(function ($payload) {
    // e.g., revoke tokens, archive data for $payload['store_hash']
});

BC::setRemoveStoreUserCallBack(function ($payload) {
    // e.g., detach user from store
});

// Later in your app code:
// Ensure the store hash is set (done during load/install), then get the token
$token = BC::getStoreAccessToken();
$store = BC::store(); // current store Eloquent record
```

Advanced: You can override how the access token is resolved or how the current store is found using `setGetStoreAccessTokenCallback()` and `setFindStoreFromSessionCallBack()`.

Security Notes
--------------

[](#security-notes)

- Keep `BC_CLIENT_ID` and `BC_SECRET` in env; never commit secrets.
- Production requests verify TLS by default; development uses `Http::withoutVerifying()`.
- Treat `stores.access_token` as sensitive; avoid logging.

Logos
-----

[](#logos)

Place logo assets at:

- `assets/cronix-logo.png`
- `assets/bigcommerce-logo.png`

The README header references these paths to showcase the partnership branding.

Contributing
------------

[](#contributing)

We follow Conventional Commits (e.g., `feat:`, `fix:`, `refactor:`). Please include a clear description, note schema/config changes, and add tests where possible. Open issues or PRs are welcome.

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 82.5% 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

Every ~56 days

Recently: every ~134 days

Total

19

Last Release

521d ago

Major Versions

v1.7 → v2.0-beta2022-06-11

v2.3 → v3.0-beta2023-06-10

v3.3 → v4.02024-12-07

PHP version history (2 changes)v1.0PHP ^8.0

v4.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5313201079ed954f3c61f3ace43b83805a48ee4f6686a98eaaad643f62c7eca7?d=identicon)[cronix](/maintainers/cronix)

---

Top Contributors

[![madboy-hardik](https://avatars.githubusercontent.com/u/91790065?v=4)](https://github.com/madboy-hardik "madboy-hardik (52 commits)")[![technoper-hardik](https://avatars.githubusercontent.com/u/114377492?v=4)](https://github.com/technoper-hardik "technoper-hardik (6 commits)")[![cronixweb-hardik](https://avatars.githubusercontent.com/u/132223205?v=4)](https://github.com/cronixweb-hardik "cronixweb-hardik (5 commits)")

---

Tags

authenticationbigcommercelaravellaravel-package

### Embed Badge

![Health badge](/badges/cronixweb-bigcommerce-oauth-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/cronixweb-bigcommerce-oauth-laravel/health.svg)](https://phpackages.com/packages/cronixweb-bigcommerce-oauth-laravel)
```

###  Alternatives

[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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