PHPackages                             socialiteproviders/sapoid - 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. socialiteproviders/sapoid

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

socialiteproviders/sapoid
=========================

SAPO ID OAuth2 Provider for Laravel Socialite

5.0.0(9mo ago)04MITPHPPHP ^8.0

Since Jul 17Pushed 2mo agoCompare

[ Source](https://github.com/SocialiteProviders/SapoId)[ Packagist](https://packagist.org/packages/socialiteproviders/sapoid)[ RSS](/packages/socialiteproviders-sapoid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

SapoId
======

[](#sapoid)

```
composer require socialiteproviders/sapoid
```

Installation &amp; Basic Usage
------------------------------

[](#installation--basic-usage)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

### Add configuration to `config/services.php`

[](#add-configuration-to-configservicesphp)

```
'sapoid' => [
  'client_id' => env('SAPOID_CLIENT_ID'),
  'client_secret' => env('SAPOID_CLIENT_SECRET'),
  'redirect' => env('SAPOID_REDIRECT_URI'),
],
```

### Add provider event listener

[](#add-provider-event-listener)

#### Laravel 11+

[](#laravel-11)

In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method.

- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('sapoid', \SocialiteProviders\SapoId\Provider::class);
});
```

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\SapoId\SapoIdExtendSocialite::class.'@handle',
    ],
];
```

### Configure App in SAPO ID

[](#configure-app-in-sapo-id)

To configure your app in SAPO ID, you need to create an app in the [SAPO ID Connect](https://id.sapo.pt/connect) and get the client ID and client secret.

### Usage

[](#usage)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('sapoid')->redirect();
```

To add more scopes you can use the below:

```
return Socialite::driver('sapoid')->scopes(['add','scopes','here'])->redirect();
```

Available scopes:

- `email`: provides access to user email
- `profile`: provides access to user name and avatar

Access to these scopes must be configured per app in its config page: `https://id.sapo.pt/connect/`

### Returned User fields

[](#returned-user-fields)

The default scope only has the `id`, other scopes are needed for `name`, `email` and `avatar`

- `id`: (**string**) The unique identifier for the user in SAPO ID.
- `name`: (**string**|**null**) The full name of the user.
- `email`: (**string**|**null**) The email address of the user.
- `avatar`: (**string**|**null**) The URL of the user's avatar image.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance72

Regular maintenance activity

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65eb3a7ba2a2c13b3a9de48b836caf759ad4052f9a839e30464c80d177d5b3d2?d=identicon)[atymic](/maintainers/atymic)

---

Top Contributors

[![javcorreia](https://avatars.githubusercontent.com/u/46721540?v=4)](https://github.com/javcorreia "javcorreia (1 commits)")[![maks-oleksyuk](https://avatars.githubusercontent.com/u/90793591?v=4)](https://github.com/maks-oleksyuk "maks-oleksyuk (1 commits)")

---

Tags

laraveloauthoauth1oauth2social-mediasocialitesocialite-providerslaravelprovideroauthsocialitesaposapoid

### Embed Badge

![Health badge](/badges/socialiteproviders-sapoid/health.svg)

```
[![Health](https://phpackages.com/badges/socialiteproviders-sapoid/health.svg)](https://phpackages.com/packages/socialiteproviders-sapoid)
```

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[socialiteproviders/kakao

Kakao OAuth2 Provider for Laravel Socialite

10484.7k4](/packages/socialiteproviders-kakao)

PHPackages © 2026

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