> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.ruoomsoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install Single Sign-On Plugin 1.0.0 and configure Google OAuth

## Prerequisites

* A compatible Ruoom Core 1.x environment on Python 3.10 or newer and Django 5.2.
* The licensed `single_sign_on_plugin-1.0.0-py3-none-any.whl` artifact.
* For Google OAuth: a Google OAuth client and an exact callback URL for the deployed domain.

## Install

```powershell theme={null}
python -m pip install .\single_sign_on_plugin-1.0.0-py3-none-any.whl
```

The wheel installs its pinned `social-auth-app-django` dependency. Enable the plugin in `.env`:

```text theme={null}
RUOOM_PLUGINS=single_sign_on
```

Then run:

```bash theme={null}
python manage.py migrate
python manage.py check
```

Restart the application. Core installs the plugin's middleware and mounts its URLs at `/sso/` from metadata.

## Google OAuth integration

The consuming project must add `social_django` to Django's applications, include its OAuth URLs, add `social_core.backends.google.GoogleOAuth2` to the authentication backends, and configure the Google client ID, client secret, and callback URL.

Use this pipeline order:

```python theme={null}
SOCIAL_AUTH_PIPELINE = [
    "social_core.pipeline.social_auth.social_details",
    "social_core.pipeline.social_auth.social_uid",
    "social_core.pipeline.social_auth.auth_allowed",
    "social_core.pipeline.social_auth.social_user",
    "social_core.pipeline.user.get_username",
    "plugins.single_sign_on.pipeline.base.get_username",
    "plugins.single_sign_on.pipeline.base.create_user",
    "social_core.pipeline.social_auth.associate_user",
    "social_core.pipeline.social_auth.load_extra_data",
    "social_core.pipeline.user.user_details",
]
```

## Core settings

* `SSO_TEMP_BUSINESS_ID`: temporary business used during OAuth onboarding.
* `SSO_TOKEN_TTL_SECONDS`: one-time-token lifetime; default `3600`.
* `SSO_DEFAULT_REDIRECT_URL`, `SSO_STAFF_REDIRECT_URL`, `SSO_CUSTOMER_REDIRECT_URL`, `SSO_STANDALONE_REDIRECT_URL`: role-specific destinations.
* `SSO_OAUTH_PATH_KEYWORDS`: paths the middleware treats as OAuth/SSO traffic.

Keep secrets and environment-specific callback URLs in the deployment, not in the plugin package.
