PHPackages                             winter/wn-sso-plugin - 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. winter/wn-sso-plugin

ActiveWinter-plugin[Authentication &amp; Authorization](/categories/authentication)

winter/wn-sso-plugin
====================

Adds support for OAuth-based Single Sign On (SSO) to the Winter CMS backend module through the use of Laravel Socialiate.

86033[2 issues](https://github.com/wintercms/wn-sso-plugin/issues)PHP

Since Nov 26Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/wintercms/wn-sso-plugin)[ Packagist](https://packagist.org/packages/winter/wn-sso-plugin)[ RSS](/packages/winter-wn-sso-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Winter.SSO - Single Sign-On Plugin
==================================

[](#wintersso---single-sign-on-plugin)

[![MIT License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/wintercms/wn-sso-plugin/blob/main/LICENSE)

Adds OAuth-based Single Sign-On (SSO) authentication to the Winter CMS backend using [Laravel Socialite](https://github.com/laravel/socialite). Allow your backend users to authenticate using their existing accounts from providers like Google, GitHub, Microsoft 365, and more.

Features
--------

[](#features)

- **8 Built-in Providers**: GitHub, Google, Facebook, GitLab, Bitbucket, LinkedIn, Twitter (OAuth 1.0 &amp; 2.0)
- **Extensible**: Easy integration with 100+ community [Socialite Providers](https://socialiteproviders.com/)
- **Provider Plugins**: Install additional providers as separate plugins (e.g., Winter.SSOProviderMicrosoft)
- **Event System**: Comprehensive hooks for customizing authentication flow
- **Security**: SSO ID verification, email normalization, IP logging
- **User Registration**: Optionally create new users via SSO
- **Native Auth Control**: Disable username/password login, enforce SSO-only
- **Audit Logging**: Track all SSO authentication attempts
- **Flexible Configuration**: Environment-based or file-based setup

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

[](#installation)

Install via [Composer](http://getcomposer.org/):

```
composer require winter/wn-sso-plugin
php artisan migrate
```

If using a [public folder](https://wintercms.com/docs/develop/docs/setup/configuration#using-a-public-folder), republish assets:

```
php artisan winter:mirror
```

Quick Start
-----------

[](#quick-start)

Let's set up GitHub authentication as an example:

### 1. Create OAuth App on GitHub

[](#1-create-oauth-app-on-github)

1. Go to [GitHub Developer Settings](https://github.com/settings/developers)
2. Click "New OAuth App"
3. Fill in the details:
    - **Application name**: Your Site Name
    - **Homepage URL**: `https://example.com`
    - **Authorization callback URL**: `https://example.com/backend/winter/sso/handle/callback/github`
4. Save and copy your **Client ID** and **Client Secret**

### 2. Configure Environment Variables

[](#2-configure-environment-variables)

Add to your `.env` file:

```
GITHUB_CLIENT_ID=your_client_id_here
GITHUB_CLIENT_SECRET=your_client_secret_here
```

### 3. Enable the Provider

[](#3-enable-the-provider)

Edit `config/winter/sso/config.php` (create if it doesn't exist):

```
